【发布时间】:2012-10-04 14:33:20
【问题描述】:
可能重复:
jquery or css selector? select all id’s that start with
我需要选择所有id以"Monday_"开头的元素,例如id="Monday_16"
【问题讨论】:
可能重复:
jquery or css selector? select all id’s that start with
我需要选择所有id以"Monday_"开头的元素,例如id="Monday_16"
【问题讨论】:
你可以使用attribute starts with选择器:
$("[id^='Monday_']");
或更好:
$("tagname[id^='Monday_']");
【讨论】:
您可以使用attribute starts with selector 来完成:
$('[id^="Monday_"]')
【讨论】: