慕莱坞森
<body >
<input type="text">
<div></div><script>
let dom = document.getElementsByTagName('input')[0]; let value = dom.value;
dom.oninput=()=>{ let new_value = dom.value; if(value.length<new_value.length){ document.getElementsByTagName('div')[0].innerHTML = "输入中";
}else{ document.getElementsByTagName('div')[0].innerHTML = "删除中";
}
value = new_value;
}</script></body>