How do i make this function open up wwwgooglecom after the b

How do i make this function open up www.google.com after the button is created on a new page? In other words, When i click on the button google, it should open up www.google.com. Here is my html code:

<tr>
       <td> Google</td>
       <td> Google Search</td>
       <td> <button onclick=\"googleSearch()\">Lets find something</button></td>
   </tr>

and javascript code:

function googleSearch(){
       page += \"<button>google</button>\";

   }
  

Solution

Hi,

I have modified the code and it is reddirectint to the google page when you click on button.

<html>
<head>
<title>
Google
</title>
<script type=\"text/javascript\">
function googleSearch(){
var page = \"http://www.google.com\";
window.location(page);

}
</script>
</head>
<body>
<table>
<tr>
<td> Google</td>
<td> Google Search</td>
<td> <button onclick=\"googleSearch()\">Lets find something</button></td>
</tr>
</table>
</body>
</html>

How do i make this function open up www.google.com after the button is created on a new page? In other words, When i click on the button google, it should open

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site