首页 > 代码库 > HTML设置焦点

HTML设置焦点

<body  

    <form action="" method="post" name="form1" >

        <input type="text" id="id" />

    </form>

</body>


<script> function myfocus() { document.getElementById(‘id‘).focus(); } </script>