jQuery [Attribut^=Wert] Selektor
Beispiel
Wählen Sie alle <input>-Elemente mit einem name-Attribut aus, das mit „nation“ beginnt:
$("input[name^='nation']")
Definition und Verwendung
Der Selektor [attribute^=value] wählt jedes Element mit einem bestimmten Attribut aus, dessen Wert mit einer bestimmten Zeichenfolge beginnt.
Syntax
$("[attribute^='value']")
Parameter | Description |
---|---|
attribute | Required. Specifies the attribute to find |
value | Required. Specifies the string the value should begin with |