Fill an input-box by url without editing the recei

2019-09-06 21:40发布

问题:

I want to fill an input-box which I don't have any access on it ( so I can't add any javascripts ) with url. Something like :

http://google.com/#id_searchfield=text

I mentioned google so that you know that the receiver page is not under my control.

Is it possible or not ?

  • If it's impossible , Is there a way to do that with another page on a different domain instead of url ? ( some code or .. )

I have seen these but all of them needs access on the receiver page :

  • Pre-fill form field via URL in html

  • How can I pre-populate html form input fields from url parameters?

  • postMessage() Api

  • localstorage

回答1:

to send data via an URL you need to find the name of the object you want to fill, so in case of google, you need to go to
https://www.google.nl/?q=CongratzYouFoundIt
To add spaces replace them with %20, so
https://www.google.nl/?q=Congratz%20You%20Found%20It%20Again
Other special chars are aviable with HTML special Chars