<html><head> <style> #oDiv{ display:none; } </style> <script> window.onload = function(){ var oInput = document.getElementById('oInput'); var oDiv = document.getElementById('oDiv'); oInput.onFocus = function(){ oDiv.style.display = "block"; } oInput.onBlue= function(){ oDiv.style.display = "none"; } } </script></head><body> <form method="post" action=""> <input id="oInput" name="userName" type="text"/> </form> <div id="oDiv"> input获得焦点我显示,失去的时候我隐藏 </div></body></html>
添加回答
举报
0/150
提交
取消