How do I redirect from one html/js document to another within a function? I am trying to reduce the amount of code within one function so I don't get confused. Need help. If you need my code ask and I will post.
Code:
<!DOCTYPE html> <html> <head> <title> Math Game </title> <style> </style> </head> <body> <script type="text/JavaScript"> function start() { var a= confirm("Are you sure you want to continue to the game?"); if (a==true) { //Here is where it should take the viewer to the other html document. } else { window.close(); } } </script> <center><button onClick="start()">Start</button></center> </body> </html>
Comment