function GetComment(url,sid,pnum,snum,job) { var Obj=document.getElementById("comment"); if(Obj==null) { alert("页面中不存在id为comment的元素或代码有误"); return false; } var plstr="softid="+sid+"&page="+pnum+"&start="+snum; if(job) { var keyw=''; var plfen=document.getElementById("plfen").value; var plname=document.getElementById("plname").value; var content=document.getElementById("content").value; if(content=='') { alert("请输入评论内容"); return false; } if(strLength("content")>200) { alert("请删减多余的字再提交"); return false; } if(strLength("plname")>20) { alert("称呼者名字太长"); return false; } plname=plname.replace(/(—)/g,"x-A-1-A-A-x"); content=content.replace(/(—)/g,"x-A-1-A-A-x"); plstr+="&plfen="+plfen+"&plname="+encodeURIComponent(plname)+"&content="+encodeURIComponent(content)+"&keyw="+keyw+"&x="+Math.random(); } var Ajax=false; if(window.XMLHttpRequest){ Ajax=new XMLHttpRequest(); if(Ajax.overrideMimeType){ Ajax.overrideMimeType("text/xml"); } } else if(window.ActiveXObject){ try{ Ajax=new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try{ Ajax=new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){} } } if(!Ajax){ alert("不能创建XMLHttpRequest对象实例."); return false; } Ajax.open("POST",url,true); Ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); Ajax.send(plstr); Ajax.onreadystatechange=function(){ if(Ajax.readyState==4) { if(Ajax.status==200) { Obj.innerHTML=Ajax.responseText; } else { Obj.innerHTML='