Содержание:
password selector
Описание: Selects all elements of type password.
Добавлен в версии: 1.0jQuery( ":password" )
$( ":password" )
is equivalent to $( "[type=password]" )
. As with other pseudo-class selectors (those that begin with a ":") it is recommended to precede it with a tag name or some other selector; otherwise, the universal selector ( "*" ) is implied. In other words, the bare $( ":password" )
is equivalent to $( "*:password" )
, so $( "input:password" )
should be used instead.
Дополнительные замечания:
-
Because
:password
is a jQuery extension and not part of the CSS specification, queries using:password
cannot take advantage of the performance boost provided by the native DOMquerySelectorAll()
method. For better performance in modern browsers, use[type="password"]
instead.