获取在jquery和js中为select标记选择的选项值和文本
jquery :
//获取选定选项的文本值
$('#id option:selected ' ).text (;
$('#id”).find (“option :选定”).text ) ) )。
获取选择选项的选定值
$'#id'(.val );
$('#id option:selected ' ).val (;
$('#id”).find (“option :选定”).val ) )。
js :
varsel=document.getelementbyid (“id”
var index=sel.selectedIndex; //检查索引
sel.options[index].value; //想要的值
sel.options[index].text; //想要的文本