Jump to content

Javascript


VARN

Recommended Posts

I am trying to make a one click file that will release and renew the DHCP on my router. I was thinking using a .bat file; I am stuck.

 

I have

http://192.168.0.1/index.php

delay

javascript:void(document.getElementsByName('LOGIN_USER')[0].value='admin');

javascript:document.getElementsByName('login')[0].click();

delay

http://192.168.0.1/st_device.php

delay

javascript:document.getElementsByName('DHCP Release')[0].click();

delay

javascript:document.getElementsByName('DHCP Renew')[0].click();

 

Each of these work separately pasting into the address bar; I do not know how to make them work together. I also need to input some delays to give the pages time to load.

 

If a .bat file cannot work I could use

var script=document.createElement('script');
script.src='*.js';
document.getElementsByTagName('head')[0].appendChild(script);

as a bookmark to call a .js file. Any help would be appreciated.

 

 

 

Never mind I just bought a new router.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.