时间:2021-07-01 10:21:17 帮助过:41人阅读
<html>
<head>
<title>$.ajax的应用</title>
<script type="text/javascript" language="javascript" src="./js/jquery.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
$('#bot_1').click(function(){
$.post('ajax.php',{web:"mysql100"},function(data,st){$("div").html(data);})
})
})
</script>
</head>
<center><h2>$.ajax的应用</h2></center>
<center><div>这是需要显示的地方</div></center>
<center><button id="bot_1">点击我吧</button></center>
</html>
===============================================================
ajax.php
<?php
echo '您要访问的网站是'.$_POST['web'];
?>
以上就是jquery如何实现ajax技术2:$.post()的内容,更多相关内容请关注PHP中文网(www.gxlcms.com)!