autofocus on input

<input name="Titel" /> <script> $(document).ready(function() { $("input[name='Titel']").focus(); //jquery version document.getElementsByName('Titel')[0].focus(); //vanila js^ ^ }); </script>

2 Responses

Ничего против не имею, но... что, просто атрибут autofocus нужному инпуту поставить уже не модно? Надо целый фреймворк подключать?
@Konstantin Всё ещё многие браузеры не обрабаытвают должным образом автофокус ( . .)

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.