×

常用的基于jquery的ajax局部刷新小案例

作者:andy0012017.04.24来源:Web前端之家浏览:11702评论:0
关键词:JQueryJS

常用的基于jquery的ajax局部刷新小案例。

<html>
<head>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript"> 
function getOtherMessage(){ 
$.ajax({ 
type:"post", 
url:"${pageContext.request.contextPath}/getOtherMessage.do", 
success:function(msg){ 
$("#view").html(msg); 
}, 
error:function(){ 
alert("wrong"); 
} 
}); 
} 
</script>
</head>
<body>
<input type="button" value="修改" onclick="getOtherMessage();" />
<div id="view">
456
</div>
</body>
</html>

您的支持是我们创作的动力!
温馨提示:本文作者系 ,经Web前端之家编辑修改或补充,转载请注明出处和本文链接:
https://www.jiangweishan.com/article/biji73.html

网友评论文明上网理性发言 已有0人参与

发表评论: