微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

select标签设置默认选中的选项方法

方法有两种。

第一种 通过标签选中项文本的js代码为:

rush:xhtml;"> var val = document.all.Item.options[document.all.Item.selectedindex].text var i=document.getElementById( 'sel' ).options[document.getElementById( 'sel' ).selectedindex].value;

一些其它操作