<html><body>
<input type="text" name="username" onchange="a(this)" />
<script>function a(i){alert(1)}</script>
</body></html> 在input中输入时,
浏览器有历史输入内容的提示(或用到了关键词联想),
如果选择下拉的某一项,input的内容变了,但是收不到onchange。
<input type="text" name="username" onchange="a(this)" />
<script>function a(i){alert(1)}</script>
</body></html> 在input中输入时,
浏览器有历史输入内容的提示(或用到了关键词联想),
如果选择下拉的某一项,input的内容变了,但是收不到onchange。
onchang 就是内容变化时触发
onkeyup="autoComplete.hdleEvent(event);"
onFocus="autoComplete.expandAllItem();"
value="<%=PageUtil.getPageString((String)request.getAttribute("merchantName"))%>" id="merchantName" class="text"
dataType='Require' msg='* 您还填写商户,请填写'></input>
window.onload = function(){
var oInput = document.getElementById('d2');
oInput.onpropertychange = oInput.oninput = function(){
alert('aaa');
};
};<input type="text" id="d2" value="bbb" />这么写IE跟FF都支持~··