javascript - How to go to another html page and click a button automatically? -


i got 2 html page , b. when click link in a, want open b , pass value b. value added text input in b , button in b click automatically?

how achieve function?

i´m not quite sure of want i'll give try, first need javascript or js library achieve , php.

first things first: create link:

<a href="pageb.html">go page b</a> 

now can pass value using method, since want pass value need page format .php , not .html. add value link:

<a href="pageb.php?data=123">go page b</a> 

so have value named "data" '123' in it.

in page b need open php initializer this:

<?php   $data = $_get['data']; ?> <input type='text' value='<?=$data?>' /> <input type='submit'id="buttontobeclicked" >  <script>      document.getelementbyid("buttontobeclicked").click(); </script> 

in case need form action. stuff inside click button automatcly

hope helped.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -