挑战题
- 1
- 2
- 3
- 4
- 5
- 6
- 7
更多
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
改成下面这样就可以啦,因为你调用
show这个方法会使li的行内样式设置成style="display: none;",所以这个时候通过$('li[display:none]')选择器使选择不到的重点在这一行
$("li:eq(4),li:eq(5)").show();
跟你的代码比较一下你就知道问题出在哪里了,我就不告诉你了。
这样可以运行