ajax之post方法
来源:互联网 发布:淘宝代销能赚钱吗 编辑:程序博客网 时间:2024/06/06 05:01
引用
$.post(//ajax方法提交表单数据
"TopicServlet.serv?doaction=markTopicById&topicId="+topicId+"&zd="+zd+"&tj="+tj+"&jh="+jh+"&role=1",//url
function(data){
$.uiHelper.hideLoading();
if(data==1){
alert("标记成功!");
reloadPage();
}
else {
alert("标记失败!");
}
$("#edit-dialog").dialog("close");
}
);
或者:
$.post(
"TopicServlet.serv",
{doaction : "getReplyById", id : topicReplyId},
function call(data){
var bean = data;
if(bean.isAllow){
$("#isBlockReply_dialog").dialog({//激活弹出框
resizable: false,
height:160,
modal: true,
buttons: {
"确 定": function() {
$( this ).dialog( "close" );
$.ajax({
async:true,
cache:false,
type:"POST",
dataType: "json",
url:"TopicServlet.serv",
data:"doaction=modifyTopicReplyBlock&topicReplyId="+topicReplyId,
beforeSend:function(){
$.uiHelper.showLoading();
},
error:function(){
$.uiHelper.hideLoading();
alert('数据获取失败!');
},
success:function(data){
$.uiHelper.hideLoading();
if(data==1){
//alert("设置成功!");
reloadPage();
}
else {
$("#tip-error-dialog").dialog({//激活弹出框
resizable: false,
height:180,
modal: true,
buttons: {
"确 定": function() {
$( this ).dialog( "close" );
}
}
});
}
}
}
);
},
"取 消": function() {
$( this ).dialog( "close" );
}
}
});
}else{
$("#power-dialog").dialog({//激活弹出框
resizable: false,
height:180,
modal: true,
buttons: {
"确 定": function() {
$( this ).dialog( "close" );
}
}
});
}
},
"json"//规定预计的服务器响应的数据类型。
);
0 0
- ajax之post方法
- jQuery.ajax之post()方法实例
- jQuery教程 - Ajax之$.get()方法和$.post()方法
- jQuery Ajax之$.get()方法和$.post()方法
- jQuery ajax --post() 方法
- Ajax post方法
- jQuery ajax - post() 方法
- jQuery ajax - post() 方法
- JQuery AJAX $.post()方法
- jQuery ajax - post() 方法
- jQuery ajax - post() 方法
- jQuery ajax - post() 方法
- jquery-ajax-$post方法
- Ajax之Post理解
- ajax之 $.get() , $.post()
- jquery之ajax post
- ajax之$.post
- 6.5.2: jQuery的Ajax之$.get()和$.post()方法
- 数据库中的触发器的实例讲解
- 基本样式
- span和图片
- Turbine怎样获取到节点的监控信息
- 获取距离当前时间任意天数的时间
- ajax之post方法
- select 选中的序号
- js字符串常用判断方法
- 循环冗余校验(CRC)算法入门引导
- 计算相对今日任意a天前的日期,a可正可负
- Android 在扫描U盘解析图片缩略图时,拔出U盘导致崩溃
- 解决https证书导入路径有空格问题
- 利用hibernate查询语句查询信息,默认当日,否则往前推
- ThinkPHP使用Tcpdf导出pdf文档