日期:2014-05-16 浏览次数:20702 次
<script type="text/javascript">
function loadPage() {
$.ajax({
url: 'page.html',
type: 'post',
success: function (responseText) {
$('#div1').html(responseText);
}
});
}
</script>
<input type="button" onclick="loadPage();" value="加载" />
<div id="div1"></div>
<script type="text/javascript">
function test() {
alert('hello world!');
}
</script>
<input type="button" onclick="test();" value="执行" />