为什么 input的 onfouse 和 onblur 为什么有时候用不了 ?? 我前段时间做完测试还是可以弄的 但是今天重新试了下 发下就用不了?? <input ID="TxteachID" runat="server"
onblur="topicApply_teachID_check(); document.getElementById('topicApply_teachID_Stat').className = 'tip_off'"
onfocus="document.getElementById('topicApply_teachID_Stat').className = 'tip_on '"
type="text" />
<input ID="TxteachName" runat="server"
onblur="topicApply_teachName_check(); document.getElementById('topicApply_teachName_Stat').className = 'tip_off'"
onfocus="document.getElementById('topicApply_teachName_Stat').className = 'tip_on '"
type="text" />这里的 onblur属性就是触发不了!!!!!
onblur="topicApply_teachID_check(); document.getElementById('topicApply_teachID_Stat').className = 'tip_off'"
onfocus="document.getElementById('topicApply_teachID_Stat').className = 'tip_on '"
type="text" />
<input ID="TxteachName" runat="server"
onblur="topicApply_teachName_check(); document.getElementById('topicApply_teachName_Stat').className = 'tip_off'"
onfocus="document.getElementById('topicApply_teachName_Stat').className = 'tip_on '"
type="text" />这里的 onblur属性就是触发不了!!!!!
topicApply_teachID_check(); 这个里面的内容?
JS
//工号检验
function topicApply_teachID_check()
{
var id= document.getElementById('TxteachID').value;
if( id == null || id == "")
{
document.getElementById('topicApply_teachID_Stat').innerHTML = "<font color = red>"+TopicApply_TeachID_IsNull + "</font>";
return;
}
var url = "server/apply_check.aspx?action=teach_id&id="+ escape(id)+"&time=" + Math.random();
TunnelRequest.Get( url,topicApply_teachID_check_Callback);
}HTML
<tr>
<td class="style2"><span>教师工号</span>
</td>
<td class="style4">
<input ID="TxteachID" runat="server"
onblur="topicApply_teachID_check(); document.getElementById('topicApply_teachID_Stat').className = 'tip_off'"
onfocus="document.getElementById('topicApply_teachID_Stat').className = 'tip_on '"
type="text" /> </td>
<td id="topicApply_teachID_Stat" class=" tip_off"></td>
</tr>
提示:TopicApply_TeachID_IsNull没定义!!
<input ID="TxteachID" runat="server"
onblur="alert('ceshi');topicApply_teachID_check(); document.getElementById('topicApply_teachID_Stat').className = 'tip_off'"
onfocus="alert('ceshi');document.getElementById('topicApply_teachID_Stat').className = 'tip_on '"
type="text" />