Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Call Javascript function from a URL

Is it possible to call a javascript function from the URL? I am basically trying to leverage JS methods in a page I don't have access to the source.

Something like: http://www.example.com/mypage.aspx?javascript:printHelloWorld()

I suspect the answer to this is no but, just wondered if there was a way to do it.

Answer*

Draft saved
Draft discarded
Cancel
2
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. Commented Sep 11, 2021 at 8:39
  • That's like saying "You can open www.example.com and then click on the button that runs the js". It's not what OP wants Commented Oct 27, 2021 at 14:15

lang-js

AltStyle によって変換されたページ (->オリジナル) /