87,994
社区成员
发帖
与我相关
我的任务
分享
<input type="text" id="a">
<script type="text/javascript">
document.querySelector('#a').onblur = function() {
document.querySelector('#a').value = ""
document.querySelector('#a').focus()
}
</script>
第二:把所有条件去掉,直接失去焦点直接 inputItem.value="";看看是否有异常
第三:监听事件是否有其他的地方赋值inputItem.value=undeifined的变量;