[Jquery]发送Ajax请求
来源:互联网 发布:python decorator 编辑:程序博客网 时间:2024/05/14 11:42
ajax方式
$.ajax({ async:false, // false为同步, true为异步 type:"POST", url:"/entity/recruit/recSiteStuManage_checkPrpmsExist.action", dataType:"json", data:{ 'studentId':studentId, 'siteId':siteId, 'gradeId':gradeId, 'edutypeId':edutypeId, 'orientId':orientId}, success:function(data){ if(data.success == "success") { alert("success"); } else { alert("failed"); } }, error:function(data){alert(data.success);}});
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
post方式
$.post( "/entity/recruit/recSiteStuManage_checkPrpmsExist.action", { 'studentId':studentId, 'siteId':siteId, 'gradeId':gradeId, 'edutypeId':edutypeId, 'orientId':orientId }, function(data){ if(data.success == "success") { alert(data.text); } else { alert(data.text); } }, "json");
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
服务端返回
action:
String ajxResult = "{success : 'success'; msg : '请求成功'}";return "ajxcheck";
jsp:
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld" %><% response.setHeader("expires", "0"); %><s:if test='ajxResult!=null'><s:property value="ajxResult" escape="false"/></s:if><s:else><s:property value="#request.ajxResult" escape="false"/></s:else>
0 0
- JQuery发送Ajax请求
- [Jquery]发送Ajax请求
- jQuery发送Ajax请求
- jQuery发送Ajax请求
- jquery中发送ajax请求
- 使用jQuery发送Ajax请求
- 使用jquery发送ajax请求
- jQuery发送ajax请求,PHP响应ajax请求(含跨域)
- jquery发送ajax请求返回数据格式
- 在jquery通过ajax发送异步请求
- ThinkPHP用jQuery发送ajax请求问题
- jquery 循环调用ajax发送请求
- Jquery Ajax发送请求的方法
- 利用JQuery发送ajax请求进行站内搜索
- jquery ajax发送请求实例模板
- 使用jQuery发送AJAX请求时不缓存
- [置顶] jQuery发送ajax请求,一次点击重复提交
- Jquery 发送ajax请求,action xml…
- mysql杂记
- 项目中集成聊天功能所过的坑
- MyBatis传入参数的问题
- WEB消息提醒实现之一 背景
- java.lang.ClassNotFoundException: com.mysql.jdbc.Driver问题
- [Jquery]发送Ajax请求
- 使用jQuery设置disabled属性与移除disabled属性
- linux中fork、vfork、clone函数
- 替换空格
- 2.约瑟夫问题
- ubuntu-安装sogou输入法
- window.open()打开的新窗口被拦截的原因分析和解决方案
- 获取验证消息
- 禁止 UITextField 的粘贴、复制