简体   繁体   中英

Javascript : Onblur on a group of Input

Is there any way to add onblur event on a container of 2 input below ?

<tr>
   <td>
      <input id="firstName" type="text" />
   </td>

   <td>
     <input id="lastName" type="text" />
   </td>
</tr>

在此输入图像描述

you might not be able to have an onblur for a div if you happen to put that as a container for your inputs grouped together.

this might help

How to get div onblur event to execute a javascript function?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM