chooseProvince()
function chooseProvince(){
var sexSel = document.getElementById("sex");
var musicSel = document.getElementById("music");
sexSel.onchange = function(){
window.ec.toast("sexSel成功"+sexSel.selectedIndex);
if(sexSel.selectedIndex !=-1){
console.log("你选择了:" + sexSel.options[sexSel.selectedIndex].value);
//window.ec.toast("sexSel成功"+sexSel.options[sexSel.selectedIndex].value);
window.ec.toast("sexSel成功"+sexSel.selectedIndex);
//$(this).attr("selected",true);
//sexSel.options[sexSel.selectedIndex].attr("selected",true);
//$(".selector").find("option:contains('pxx')").attr("selected",true);
sexSel.find("option:contains('"+sexSel.options[sexSel.selectedIndex].value&
select下拉菜单更新函数
最新推荐文章于 2022-04-14 15:10:52 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)