how to go to certain url inside function javascript code example Example: javascript go to url window.location = url;