English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
[ attribute |= value Selector selects elements with specified attributes whose values are equal to the given string, or start with the string followed by a hyphen (-)
This selector is usually used to handle language attributes.
$("[attribute|=value]")
Select all elements with a lang attribute starting with "en":
$ (document).ready(function () { $("[lang|=en]").css("color", "green"); });Test and see‹/›
Parameters | Description |
---|---|
attribute | Specify the attribute name to be selected |
value | Strings that start with the specified attribute value should be specified |