The onblur failure of Easyui Exotic event-textbox

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.