标签:nbsp 字符 func 参数 color hang this div style
<select id="save"> <option value="哈哈}">看看</option> </select>
$("#select").change(function () { //收集参数,this代表的是select标签 var stageText=$(this).find("option:selected").text();//这个能获取option的text值 var stageText2=$(this).val();//这个获取的select的value值,获取的是”哈哈“ var kkk = $("#this").text();//这个获取的select的text值,因为select中什么都没有写,只能获取一个空字符串 }
标签:nbsp 字符 func 参数 color hang this div style
原文地址:https://www.cnblogs.com/pogusanqian/p/12608037.html