码迷,mamicode.com
首页 > Web开发 > 详细

ajax用法

时间:2017-08-13 16:28:16      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:syn   document   http   res   div   src   html   arp   加载   

1.将其他页面加载进来

<head>
<script type="text/javascript" src="~/Scripts/jquery-1.10.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#b01").click(function(){
htmlobj=$.ajax({url:"Register",async:false});
$("#myDiv").html(htmlobj.responseText);
});
});
</script>
</head>
<body>

<div id="myDiv"><h2>通过 AJAX</h2></div>
<button id="b01" type="button">改变内容</button>

</body>

2.点赞

http://blog.csdn.net/chinacsharper/article/details/9748639

ajax用法

标签:syn   document   http   res   div   src   html   arp   加载   

原文地址:http://www.cnblogs.com/jiangcm/p/7353557.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!