proud Posted February 18, 2007 Share Posted February 18, 2007 I was wondering whether javascript has a header function like the one in php that directs the one to another page? and if there exists please i would like to know it's syntax? Link to comment https://forums.phpfreaks.com/topic/39074-does-javascript-have-a-header-function/ Share on other sites More sharing options...
sync2007 Posted February 18, 2007 Share Posted February 18, 2007 JavaScript allows you to change the location (or page that is currently loaded into the window) by simply setting it equal to another URL: location='http://yahoo.com' You can achieve the same results by appending "location" with "href": location.href='http://yahoo.com' Link to comment https://forums.phpfreaks.com/topic/39074-does-javascript-have-a-header-function/#findComment-188200 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.