Javascript method focus

យើងមាន form ដែលត្រូវបញ្ចូលតំលៃ ហើយយើងចង់ឲ្យវាបើក page មកវាដាក់ cuser នៅក្នុងប្រអប់យើងត្រូវប្រើ method fucus() ដើម្បីដាក់ cuser នៅក្នុងប្រអប់នោះ

</head>

<body>
    
   <label for="">Name:</label> <input type="text" id="name">
   
</body>
    <script>
        let name = document.getElementById("name")
        name.focus()
    </script>
</html>

Post a Comment

0 Comments