Can an Option in a Select tag carry multiple values?

前端 未结 15 2474
执念已碎
执念已碎 2020-11-22 17:42

I got a select tag with some options in a HTML form:
(the data will be collected and processed using PHP)

Testing:


    
    
    
    

JS

$('select.example').change(function() {

    var other_val = $('select.example option[value="' + $(this).val() + '"]').data('value');

    console.log(other_val);

});

提交回复
热议问题