开发者

Empty a Select Box with YUI 2

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜