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.
我可以在 jquery nth-child 分号内做算术吗?
例如:
alert($('img:nth-child(2+1)'));
我检查了很多次,但我仍然无法收到警报。
尝试这个:
alert($("img:nth-child("+(2+1)+")");