开发者

Empty a Select Box with YUI 2

开发者 https://www.devze.com 2023-02-05 23:08 出处:网络
If you have a select box that looks like this: <select id=\"test\"></select开发者_如何学C>

If you have a select box that looks like this:

<select id="test"></select开发者_如何学C>

You could empty it with jQuery like this:

$('#test').empty();

How could I do something like this using YUI 2?

Thanks!


No idea how you would do this with YUI 2 but here's how you could do it with plain javascript:

document.getElementById('test').length = 0;
0

精彩评论

暂无评论...
验证码 换一张
取 消