function updatecom()
{
//提交评论
$("#msg").addClass("msg");
$.ajax({
beforeSend:function(){$("#msg").html("正在发送数据");},
type: "POST",
//timeout:2000,
url: "xhttp.php",
data:$("input[@type=text]").serialize()+"&content="+$("#content").val()+"&rubyid="+$("#rubyid").val()+"&readycom="+$("#readycom"),
success: function(getstr){
changeimg();
if(getstr=="code_error"){
$("#msg").html("验证码错了");
}else if(getstr=="cnull"){
$("#msg").html("评论的内容为空");
}else{
$("#msg").html("你的评论提交成功,刷新后显示");
$("#recom").append("<div class =cls7>您添加的评论:<br />"+$("#content").text().replace("<","<")+"</div>");
document.getElementById("comments").reset();
}
},
error:function(){("#msg").html("发生错误");}
})
}
</script>
{
//提交评论
$("#msg").addClass("msg");
$.ajax({
beforeSend:function(){$("#msg").html("正在发送数据");},
type: "POST",
//timeout:2000,
url: "xhttp.php",
data:$("input[@type=text]").serialize()+"&content="+$("#content").val()+"&rubyid="+$("#rubyid").val()+"&readycom="+$("#readycom"),
success: function(getstr){
changeimg();
if(getstr=="code_error"){
$("#msg").html("验证码错了");
}else if(getstr=="cnull"){
$("#msg").html("评论的内容为空");
}else{
$("#msg").html("你的评论提交成功,刷新后显示");
$("#recom").append("<div class =cls7>您添加的评论:<br />"+$("#content").text().replace("<","<")+"</div>");
document.getElementById("comments").reset();
}
},
error:function(){("#msg").html("发生错误");}
})
}
</script>
作者:Else 's Blog
地址:http://www.aixq.com/post/922/
版权所有。转载时必须链接形式注明作者和原始出处及本声明!
中查看更多“jquery的提交評論!”相关内容
中查看更多“jquery的提交評論!”相关内容
中查看更多“jquery的提交評論!”相关内容
中查看更多“jquery的提交評論!”相关内容
中查看更多“jquery的提交評論!”相关内容
中查看更多“jquery的提交評論!”相关内容最后编辑: Else 编辑于2008/01/24 00:14
wxxslt
2008/01/23 12:09
完全看不懂……
Else 回复于 2008/01/24 00:17
哈哈,现在这个jq写得还不错吧,到时候说给你听吧,有一个教程,但是你先学好脚本先
分页: 1/1
1
1
asp跳出while循環
jquery在线无刷新式购物车的js


2008/01/23 11:18 | by 
