日期:2014-05-16 浏览次数:20622 次
<script type="text/javascript" src="../../inc/ajax.js"></script> <script language="javascript"> function fetchGX(gyff,gxmc){ createXMLHttpRequest(); xmlHttp.onreadystatechange =handleGX; var strurl = "../../utils/fetch/fetch_gx.jsp?gyff="+gyff+"&gxmc="+gxmc; xmlHttp.open("POST", strurl, true); xmlHttp.send(null); } function handleGX(){ if(xmlHttp.readyState == 4){//0(未初始化);1(正在装载);2 (装载完毕);3 (交互中);4 (完成) if(xmlHttp.status == 200){//200(OK);404(not found) var str=xmlHttp.responseText.replace(/[\r\n]/g,"").replace(/(^\s*)|(\s*$)/g,""); if(str.equals("true")) { alert("已存在,重新输入"); return false; } } } } </script>