HTML DOM Event 对象

var event;if (document.createEvent){event = document.createEvent("HTMLEvents");event.initEvent("change", true, false);document.getElementById("fname").dispatchEvent(event);} else {document.getElementById("fname").fireEvent("onchange")}

 

http://www.w3school.com.cn/jsref/dom_obj_event.asp

 

你可能感兴趣的:(HTML DOM Event 对象)