Change the mindset into a keyboard key event, as follows:
<asp:textbox id= "txtname" runat= "Server" onkeyup= "Fnamechange" (); " ></asp:TextBox>
Here's a bit of a problem: you copy and paste, and you can't trigger this event. Here are some of the relevant code:
Copy Code code as follows:
function Fnamechange () {
if ($ (' #txtName '). Val (). length<6) {
JQuery ("#checkSta"). HTML ("name is too short!"). "). CSS (" Color "," red ");
}else{
Myajax ();
}
}
Here are some of the things you search on the Web:
Copy Code code as follows:
OnLoad () event
$ (function () {//the event was actually followed, but the timing was not correct.
$ (' #txtName '). Change (function () {Fnamechange ();});
})
* * This is someone said with JS implementation, I found that can not be used.
<script language= "javascript" type= "Text/javascript" >
Window.onlad = function () {
document.getElementById (' tx1 '). attachevent ("onchange", Txchange)
}
function Txchange () {
Alert ("");
}
</script>
*/
For the time being, whoever has the real onchange () method, please tell me, thank you.