jquery的提交評論!

| |
[不指定 2008/01/23 11:18 | by Else ]
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("<","&lt;")+"</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
    代码 程序 编程 | 评论(1) | 引用(0) | 阅读(1627)
    wxxslt
    2008/01/23 12:09
    完全看不懂……
    Else 回复于 2008/01/24 00:17
    哈哈,现在这个jq写得还不错吧,到时候说给你听吧,有一个教程,但是你先学好脚本先
    分页: 1/1 第一页 1 最后页
    发表评论
    表情
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    emotemotemotemotemot
    打开HTML
    打开UBB
    打开表情
    隐藏
    昵称   密码   游客无需密码
    网址   电邮   [注册]