Over a million developers have joined DZone.

Focus To First Input (greasemonkey)

·
// kakšen kmet morš bit da ne daš fokusa na input


for (i=0; document.getElementsByTagName('input').length; i++) {
    if(document.getElementsByTagName[i].type == 'text') {
        document.getElementsByTagName[i].focus();
        exit;   
    }
}
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}