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

Return to Question

deleted 93 characters in body; edited title
Source Link
miken32
  • 42.5k
  • 16
  • 127
  • 177

Call Javascript function from a URL/address bar

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 know if you put javascript:alert("Hello World"); into the address bar it will work.

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

Call Javascript function from URL/address bar

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 know if you put javascript:alert("Hello World"); into the address bar it will work.

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

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.

add the purpose of the question which may help any other workaround(ps:the edited content is come from author's comment)
Source Link
NaN
  • 9.1k
  • 7
  • 35
  • 54

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

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

I know if you put javascript:alert("Hello World"); into the address bar it will work.

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

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

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

I know if you put javascript:alert("Hello World"); into the address bar it will work.

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

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 know if you put javascript:alert("Hello World"); into the address bar it will work.

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

add the purpose of the question which may help any other workaround(ps:the edited content is come from author's comment)
Source Link

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

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

I know if you put javascript:alert("Hello World"); into the address bar it will work.

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

Is it possible to call a javascript function from the URL?

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

I know if you put javascript:alert("Hello World"); into the address bar it will work.

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

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

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

I know if you put javascript:alert("Hello World"); into the address bar it will work.

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

Formatting
Source Link
Veger
  • 38k
  • 11
  • 110
  • 118
Loading
Source Link
DazManCat
  • 3.7k
  • 5
  • 32
  • 34
Loading
lang-js

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