证码!"); mCheckNum.focus(); return false; } var dataF = $("#myForm1").serialize(); $.ajax({ type:"post", aysnc:false, url:"/newtsw/doMember_login", data:dataF, success:function(data){ if(null==data){ alert("未知原因,登陆失败!"); }else if(data.status==1){ window.location.reload(); }else{ if(data.msg){ alert(data.msg); $("#imageVerify").click(); if(data.msg.indexOf("验证码")!=-1){ $("#mCheckNum").val("").focus(); } }else{ alert("系统异常,登陆失败!"); } } } }); } function changeImg(dom){ var imgSrc = $(dom); var src = imgSrc.attr("src"); imgSrc.attr("src",chgUrl(src)); } //时间戳 //为了使每次生成图片不一致,即不让浏览器读缓存,所以需要加上时间戳 function chgUrl(url){ var timestamp = (new Date()).valueOf(); if(url.indexOf("timestamp")>=0){ url = url.substr(0,url.indexOf("timestamp")-1); } return url + "×tamp=" + timestamp; } //发布评论 function checkPubForm(){ var c = $("#loginMember1").val(); if(c ==null ||c==""){ alert("请先登录!"); return; } var content = $("#content1").val(); if(content ==null ||content ==""){ alert("评论内容不能为空!"); return;