3
可能重复:
jQuery Return elements where ID begins with a certain string计数元素的ID与某个字符串开头
好吧,让我们说,我有以下要素:
<select id="state_id" value="20">test1</select>
<select id="state_id1" value="21">test2</select>
<select id="state_id2" value="22">test3</select>
哪有我得到length()
的选择标签,该标识以state_id
在此c中开头ASE?
我试过了:$("^#state_id").length();
但没有成功。
任何提示?
谢谢!它做我需要的:) –