Tuesday, 9 January 2018

javascript - How to go to a URL using jQuery?

How to go to a URL using jQuery or JavaScript.




            href="javascript:void(0)" onclick="javascript:goToURL()">Go To
URL

function goToURL(url){
// some code to go
to
url

}


I
don't want to use window.location as I want to invoke this link from a popup.




New link should also open in a
popup. I also don't want to use Ajax. Just simulate href in
JavaScript.

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...