recently done projects with Easyui , which did not make me less trouble ah. Because easyui package, changed a lot of things, with the original JS or JQ Code is no use, spent a lot of time ah. Let's see how the onblur event of the textbox is invalidated.
through Firebug Watch HTML can find code
<tr> <td id= "Telephonenum" > Contact:</td> <td> <input id= "Tel" class= " Easyui-textbox "type=" Text "name=" tel "value=" ${usershop.tel} "/> </td></tr>
no wonder with normal Onblur The event is not, it turns out Easyui has already changed the original structure.
So the solution is:
$ ("Input", $ ("#iDCard"). Next ("span")). blur (function () {var Idcard = $ ("#iDCard"). Val (); if (trim (idcard) = = "") { document.getElementById ("Idcardtip"). Innerhtml= "<font color= ' red ' >x ID number cannot be empty </font>"; return false;} else {document.getElementById ("Idcardtip"). Innerhtml= "<font color= ' #339933 ' >√</font>"; return true;});
not only does the onblur event fail, but there are many other ways to change it, such as combox settings being selected and so on. Easyui Framework package is very full, for those of us who are unfamiliar with the front end, can quickly make the interface, easy to get started. For those who are familiar with the front end is actually a liability, because also waste a lot of time to check various APIs, with these check the time, in fact, they can knock out, for them is a kind of bondage.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Easyui-textbox onblur failure of the exotic flower event