如何删除<input>另一个列表元素中的元素?例如,
<li>
<p>
<input type='checkbox'></input>
<strong>test number</strong>
test information
</p>
</li>
Run Code Online (Sandbox Code Playgroud)
我只需要删除<input></input>,其他一切都保持不变.
超级谢谢,乔
试试这个:
$("li input").remove();
Run Code Online (Sandbox Code Playgroud)
你可能想让你的选择器明显更具体.
有关remove()的更多信息
| 归档时间: |
|
| 查看次数: |
3363 次 |
| 最近记录: |