jQuery获取select中选中的option的值和自定义属性的值

//通过绑定change事件,当下拉框内容发生变化时事件被启动
$("#wlms").bind("change",function(){
        //获取被选中的option的值
        var miaoshu = $(this).val();
        //获取自定义属性的值
        var bianhao = $(this).find("option:selected").attr("bianhao");
    });
0
0
Tags:

发表回复

Your email address will not be published. Required fields are marked *.

*
*