相关文章推荐
博学的枇杷  ·  SQL中的嵌套CASE语句 - ·  2 月前    · 
唠叨的硬盘  ·  如何实现MySQL case when ...·  2 月前    · 
微笑的青蛙  ·  selenium ...·  2 月前    · 
帅呆的篮球  ·  子查詢 (SQL Server) - ...·  1 月前    · 
豪爽的热水瓶  ·  How to export a Hive ...·  3 周前    · 
不羁的仙人掌  ·  TextField ...·  2 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I would to remove all the options (but the first one with value = 0) from a select with id="myid".

I wouldn't to use empty() and then append().

You can use .filter or .slice and .remove : api.jquery.com/filter , api.jquery.com/slice , api.jquery.com/remove Felix Kling Nov 9, 2012 at 21:03

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .