the it-madness

Javascript, Focus in Suchfeld

by on Sep.22, 2011, under Technik

Weil ich mir das nie merken kann:

<script type=”text/javascript”>
$(document).ready(function(){
$(“input[name='q']“).focus();
});
</script>

Damit landet der Cursor beim Laden der HTML Seite automatisch im gewünschten Suchfeld, bzw. Eingabefeld.


Leave a Reply

Spam protection by WP Captcha-Free

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...