开发者

Grouping jquery slectors

开发者 https://www.devze.com 2023-02-19 00:59 出处:网络
Is there a way to group jquery 开发者_JAVA百科selectors together? $(\':text, #password\').keypress(function() {

Is there a way to group jquery 开发者_JAVA百科selectors together?

$(':text, #password').keypress(function() {


Your answer should work as it is written, below are some addition links regarding combining jQuery selectors:

Multiple Selection - jQuery

StackOverflow - Combining two jQuery Selectors


If I got it right I guess it's

$(':text#password').keypress(function() { alert("hello"); });
0

精彩评论

暂无评论...
验证码 换一张
取 消