0

I have an input form on a website with a login Id field

<input type="text" id="login" value maxlength="25"> 

I want to fill this field with javascript.

var login = document.getElementById('login');
login.addEventListener('keypress', myScript(), false);
function myScript(){
    loginId.value = 'aliyakhan891';
    var query = login.value;
}

the problem is that i have tried different event handling code but it does not work properly.

I tried app.request(query); but it also doesn't work. what is the proper way to handle this event.

please visit the site to check that field.

Bilal Ahmad
  • 874
  • 9
  • 13

0 Answers0