亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

同樣的代碼,在IE中1條能實現1條卻死活沒反映

同樣的代碼,在IE中1條能實現1條卻死活沒反映

qq_菲楊_0 2015-07-24 11:31:48
<form?id="form1"?name="form1"?action="reg_insert.php"?method="post"> <table?border="0"?cellspacing="0"?cellpadding="0"?width="1000px"> ????<tr><td><table?border="0"?cellspacing="0"?cellpadding="0"> ??????<tr> ?//用戶名這一條死活沒反映 ????????<td?width="400px">用戶名:</td> ????????<td?width="170px"><input?type="text"?id="username"/></td> ????????<td?width="400px"><p?id="checkusername"></p></td> ??????</tr> ??//這一條員工編號卻可以,哪里寫錯了????????????? ???????????????<tr> ???????????????<td><label>請輸入員工編號:</label></td> <td><input?type="text"?id="keyword"?/></td> <td><p?id="searchResult"></p></td></tr> ??????<tr> ????????<td?colspan="2"><span?style="font-size:11px;?color:#999">(必填,3-16字符長度,支持字母、數字及_)</span></td> ??????</tr>document.getElementById("username").onblur?=?function()?{? var?un=username.value; if(un==""){ document.getElementById("checkusername").innerHTML?=?"寫東西??!"; }else?if(un.length<4){ document.getElementById("checkusername").innerHTML?=?"用戶名不能少于4位"; }else { document.getElementById("checkusername").innerHTML?=?"123"; } }? //這里的get傳遞頁面沒有問題。不用擔心 document.getElementById("keyword").onblur?=?function()?{? var?request?=?new?XMLHttpRequest(); request.open("GET",?"server.php?number="?+?document.getElementById("keyword").value); request.send(); request.onreadystatechange?=?function()?{ if?(request.readyState===4)?{ if?(request.status===200)?{? document.getElementById("searchResult").innerHTML?=?request.responseText; }?else?{ alert("發生錯誤:"?+?request.status); } }? } }
查看完整描述

1 回答

?
慕少0534342

TA貢獻1條經驗 獲得超0個贊

var un = username.value中的變量username是不是沒定義,沒在你貼出來的代碼中看到。


查看完整回答
反對 回復 2017-07-10
  • 1 回答
  • 0 關注
  • 1359 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號