English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
[ attribute ^ = value Selector is used to select attributes with values that match the specifiedvalueelements that start with the specified value.
$("[attribute^=value]")
Select each <a> element that has an href attribute value starting with "https":
$("document").ready(function(){ $("a[href^=https]").css({"background":"green", "color":"white"}); });Test and see‹/›
Parameter | Description |
---|---|
attribute | Specify the name of the attribute to be selected |
value | Specify the string that should start with the specified value |