简体   繁体   中英

Pass value into a textbox (on another page) using a hyperlink

Relatively new to JavaScript. Here is what I am trying to do:

1.) User clicks on hyperlink

2.) User is redirected to www.blah.com (a site I don't own)

3.) A value that is stored in the URL populates a textbox box.

BONUS:

4.) After the value is entered in the textbox, a named button is automatically activated to search for the entered string

I know if the textbox is in the SAME webpage as the hyperlink I can do something like:

 <a href="#" onclick="document.getElementById('THEID').value='blah';">THELINK</a>

How do I do this to another page?

You cannot do that for a site you don't own, security issues. You can use GreaseMonkey scripts on chrome if this is more of a hack

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM