Edit This Code:
See Result »
<
!DOCTYPE
html
>
<
html
>
<
head
>
<
script
>
function
newDoc() {
window.location.assign(
"http://www.w3schools.com"
)
}
<
/script
>
<
/head
>
<
body
>
<
input
type
="button"
value
="Load new document"
onclick
="newDoc()"
>
<
/body
>
<
/html
>
<!DOCTYPE html> <html> <head> <script> function newDoc() { window.location.assign("http://www.w3schools.com") } </script> </head> <body> <input type="button" value="Load new document" onclick="newDoc()"> </body> </html>
Result:
Privacy Policy