How do I make the button go to the google page when I write 1 in the textbox?
<!DOCTYPE html> <html> <head> <script> var x; function tab(x){ switch (x) { case 1: window.open("www.google.com"); break; case 7: break; case 15: break; case 23: break; } } </script> <title>Student Service Center</title> <meta charset="utf-8" /> <style> body{ background-image:url("42205535-laptop-student-boy-.jpg"); background-size: cover; background-repeat: no-repeat; } .foot{ position:absolute; bottom:0; } .head{ top:0; position:absolute; } .organizer1{ top:100px; position:absolute; } .organizer2{ top:150px; position:absolute; } </style> </head> <body> <div class="head" style="Background-color:#90AFC5;"> <h1><font color=#2A3132 face="Georgia" size="+3">Student Service Center</font></h1> </div> <div class="organizer1"> Section<b>:</b><input name="table" type="text"/> <button onclick="tab(table.value)">Submit</button> </div> <p class="organizer2"><a href="ZerOne.htm">ZerOne</a>||<a href="CiS.htm">CiS</a></p> <div style="background-color:gray;"><h1 class="foot"><font size="5">FCIS</font></h1></div> </body> </html>