原生的写法
let myselect = document.getElementById('select');
let index=myselect.selectedIndex ;
let val =myselect.options[index].value;
let type_id =myselect.options[index].label;
- 这样就可以获取到select里渲染的值
原生的写法
let myselect = document.getElementById('select');
let index=myselect.selectedIndex ;
let val =myselect.options[index].value;
let type_id =myselect.options[index].label;