how to open a url with the webpage name in the same window javascripot code example Example: javascript open url window.location.href = "http://example.com/";