js4

来源:互联网 发布:淘宝编辑软件 编辑:程序博客网 时间:2024/05/16 00:43
var onece=false;
//提交表单
function submitForm(formid,items,url){
onece=true;
var zd=(nowDIV==threadDIV);
$(formid).skygqCheckAjaxForm({
items: items,
url : url,
isAjaxSubmit : true,
success : showResponse,
type : 'post',
ajaxImage :'${ctxPath}webapps/images/loading.gif',
dataType :'html',
zhedang : zd
});
$(formid).submit();
}
//回调函数
function showResponse(responseText, statusText, xhr, $form)  { 
if(onece){
if(z>i){
nextDIV();
}else if(z==i){

}else {
preaDIV();
}
nowDIV.html(responseText);
i=z;
}
onece=false;
}
//删除一行
function removeRow(trId){
jConfirm('您确定这么做吗?', '确定对话框', function(r) {
if(r==true){
var x = document.getElementById(trId);  
x.parentNode.removeChild(x);  
}
});
}
function send(sendUrl,show){
$.ajax({
type: "POST",
url: sendUrl,
dataType:"html",
success: function(result){
if(show){
jAlert(result);
}
}
});
}