📜  js 获取选项值 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:35.247000             🧑  作者: Mango

代码示例2
// reference to 'scripts' select list 
// used throughout the examples below
var sel = document.getElementById('scripts');

// display value property of select list (from selected option)
console.log( sel.value );