一:JavaScript原生的方法 1:拿到select对象: var myselect=document.getElementById(“test”); 2:拿到选中项的索引:var index=myselect.selectedIndex ; // selectedIndex代表 ...
<select id="select"> <option>绥江</option> <option>西江</option> <option>北江</option> < ...
一直以为jquery获取select中option被选中的文本值,是这样写的: 实际上应该这样: ...
如何获得select被选中option的value和text 一:JavaScript原生的方法 1:拿到select对象: var myselect=document.getElementById(“test”); 2:拿到选中项的索引:var index ...
温故而知新,一起复习下jq的知识点。 (1) jq获取被选中的option的值 <select id="select_id"> <option value="0">请选择</option> <option value ...
window.open();是jquery中用来打开链接的地址。pink.html、blue.html、green.html这些是要跳转到的页面。 ...
select的id是sele,这样可以获取当前选中的option的value ...