FAIRYFAR-INTERNAL
 
  FAIRYFAR-INTERNAL  |  SITEMAP  |  ABOUT-ME  |  HOME  
您的足迹: JQuery ajax异步请求
JQuery ajax异步请求
snippet.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JQuery ajax</title>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
 
var comment = $('#comment');
$('#refresh').click(function() {
	dynamicData('comment');
});
 
function T2(res) {
	alert(res);
}
 
function dynamicData(param) {
	$.ajax({
		type : 'POST',
		url : '/post.asp',
		data : 'name=12',
		cache:false,
		success : function(result) {
			T2(result);
		}
	});
}
 
});
</script>
</head>
<body>
<input type="button" id="refresh" value="test" />
<div id="comment"></div>
</body>
</html>


打赏作者以资鼓励:
移动端扫码阅读: