document.getElementsByName('login')[0].value = 'login'; document.getElementsByName('pass')[0].value = 'password'; document.getElementsByName('login')[0].form.submit()