jQuery [แอตทริบิวต์*=ค่า] Selector
ตัวอย่าง
เลือกองค์ประกอบ <input> ทั้งหมดที่มีแอตทริบิวต์ชื่อที่มีคำว่า "nation":
$("input[name*='nation']")
ความหมายและการใช้งาน
ตัวเลือก [attribute*=value] จะเลือกแต่ละองค์ประกอบที่มีแอตทริบิวต์เฉพาะ โดยมีค่าที่มีสตริง
ไวยากรณ์
$("[attribute*='value']")
Parameter | Description |
---|---|
attribute | Required. Specifies the attribute to find |
value | Required. Specifies the string value |