I have
<select onclick="alert('I was clicked!');" onblur="alert('Lost my focus :(');">
And I have jQuery listener that will click and blur this select if another element is clicked and blurred.
I have one problem and 1 question.
Thank you!
JSFiddle http://jsfiddle.net/fallenboy/rUKyq/1/
As it seems, it cannot be achieved?
您可以使用preventDefault()函数停止默认行为
<select onclick="alert('I was clicked!'); return false;" onblur="alert('Lost my focus :(');">
要么
<select onclick="alert('I was clicked!');" onblur="alert('Lost my focus :('); return false;">
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.