📜  纯 js 中的 .change() - Javascript 代码示例

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

代码示例1
/* event listener */
document.getElementsByName("Thing")[0].addEventListener('change', doThing);

/* function */
function doThing(){
   alert('Horray! Someone wrote "' + this.value + '"!');
}