不知道怎么用一个事件达到LZ要的效果,但可以用两个事件:
<input type="text" onkeyup="div1.innerHTML=this.value;" onmousemove="div1.innerHTML=this.value;"/>
<div id="div1"></div>
<input type="text" onkeyup="div1.innerHTML=this.value;" onmousemove="div1.innerHTML=this.value;"/>
<div id="div1"></div>
var textvalue = document.form.text1.value;
setTimeout("changevalue", 100);
function changevalue()
{
var tempvalue=document.form.text1.value;
if(tempvalue!=textvalue)
{
textvalue=tempvalue;
//执行你要提交的ajax
}
}
否则太浪费资源了