Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要选择 id 以“start-”开头并以“end-”字符串结尾的元素。如何使用 jquery 选择器完成此操作?请问一个线选择器?
好吧,这个答案将选择两种类型,两种类型都以没有开始的方式结束,而正确答案的另一种方式是这个
http://jsfiddle.net/XQBGs/
$('[id|="start"][id$="end-"]')