我遇到了从 select 中获取值并将其放在 var 上的问题。
HTML
<select id="customer_select"" name="customer_select" class="select" onchange="findcustid(this.value)" >';
JS
function findcustid() {
var cus = document.getElementById('customer_select');
var customer_select = cus.options[cus.selectedIndex].value;
}
var customer_id = customer_select;
任何帮助表示赞赏!