jquery ajax 局部刷新小案例
时间:2024-05-02 17:05:01
<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>
标签:jquery,ajax,局部刷新
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Python PyQt5模块实现窗口GUI界面代码实例
2023-11-03 09:43:08
![](https://img.aspxhome.com/file/2023/4/124104_0s.png)
Bootstrap风格的WPF样式
2024-05-02 17:32:17
![](https://img.aspxhome.com/file/2023/7/129557_0s.png)
Python实现访问者模式详情
2021-02-16 05:37:51
用Python将Excel数据导入到SQL Server的例子
2021-08-21 19:24:30
Python实现程序判断季节的代码示例
2022-04-04 13:30:22
![](https://img.aspxhome.com/file/2023/1/76941_0s.png)
MySQL 搭建MHA架构部署的步骤
2024-01-17 05:27:10
![](https://img.aspxhome.com/file/2023/5/111365_0s.png)
Python调用飞书发送消息的示例
2022-10-20 14:21:23
解决pycharm安装第三方库失败的问题
2023-07-13 19:32:12
![](https://img.aspxhome.com/file/2023/8/120278_0s.jpg)
Dreamweaver定义本地站点
2010-07-02 16:27:00
深入理解JSON数据源格式
2024-05-10 14:06:09
YOLOv5车牌识别实战教程(六)性能优化与部署
2022-04-26 12:40:54
![](https://img.aspxhome.com/file/2023/3/69573_0s.png)
自动备份Oracle数据库
2024-01-20 15:08:14
python跳出双层for循环的解决方法
2022-12-25 18:55:37
详解Python语法之模块Module
2021-06-24 06:28:28
基于PHP的加载类操作以及其他两种魔术方法的应用实例
2024-05-11 09:55:18
python缩进区别分析
2022-05-18 00:37:50
Pandas库之DataFrame使用的学习笔记
2023-07-03 23:34:28
![](https://img.aspxhome.com/file/2023/1/97371_0s.png)
python中的错误如何查看
2021-05-03 08:31:22
C#操作本地文件及保存文件到数据库的基本方法总结
2024-01-17 10:27:55
Django 全局的static和templates的使用详解
2021-10-04 10:13:29
![](https://img.aspxhome.com/file/2023/4/99694_0s.png)