简体   繁体   English

如何使用 jquery 清除“选择”的内容?

[英]How do i clear the contents of a “select” using jquery?

New to jquery? jquery 的新手? How do i clear the contents of a html "select" using jquery?如何使用 jquery 清除 html“选择”的内容? Please help!请帮忙!

Just remove all options:只需删除所有选项:

$("#mySelect > option").remove();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM