1 <body> 2 <form action="index.php"> 3 <input type="text" name="txt" id="txt" value="abc"> 4 </form> 5 <script> 6 window.onload=function () { 7 var form=document.forms[0]; 8 var input=document.getElementById(‘txt‘); 9 input.onblur=function () { 10 form.submit() 11 } 12 } 13 </script> 14 </body>
原文地址:https://www.cnblogs.com/yangguoe/p/8467769.html
时间: 2024-11-07 20:05:34