jQuery [attribute ^ = value]セレクター
例
「nation」で始まるname属性を持つすべての<input>要素を選択します。
$("input[name^='nation']")
定義と使用法
[attribute ^ = value]セレクターは、特定の文字列で始まる値を使用して、特定の属性を持つ各要素を選択します。
構文
$("[attribute^='value']")
Parameter | Description |
---|---|
attribute | Required. Specifies the attribute to find |
value | Required. Specifies the string the value should begin with |