I want to be able to make my input on autofocus but when I put it like this:
<input type="text" autofocus="focus">
it doesnt work?
Why is this?
autofocus attribute isn't supported by IE, so you need to use Javascript. If you use jquery, you can emulate it:
<input type="text" autofocus="focus">
<script>
$(function() {$('[autofocus]').focus()});
</script>
When IE catches up and adds full autofocus support, you can remove the script from your webpage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With