js动态改变input的value 不触发onchange事件解决办法 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> </head> <body> <input type="text" id="two" /><br/> <select id="three" > <option>河北</option> <option>西藏</option> <option>新疆</option> </select> </body> </html> <script type="text/javascript"> var two = document.getElementById("two"); var three = document.getElementById("three"); function init(){ if("\v"=="v"){//IE浏览器 two.onpropertychange=changeValue; }else{ // 其他浏览器 two.addEventListener("input",changeValue(),false); } } three.onchange=function (){ two.value=three.value; init(); } function changeValue(){ alert(two.value); } </script>