javascript - window.location.href not redirecting -
Hope this is not a silly question.
A new page but it seems that it is not working.
Here is part of my code: (in my local host: MyProjects / QuizApp / main / index.php)
if (score> = min_scores [i ] & Amp; amp; scores & lt; = max_scotters [i]) {window.location.href = page_links [i]; }
Page_Link [] Array has a redirect URL. I (Http: youtube.com) I am testing in my local server when this line causes browser ports
Executes on http: // localhost / MyProjects / QuizApp / main / http: //www.youtube.com.
As you can see that the URL is linked to the current URL.
Why is this happening? How can I fix this?
Thank you,
You need to use the string ( "..."
):
window.location.href = "http://www.youtube.com";
Comments
Post a Comment