Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How do i make this function open up www.google.com after the button is created o

ID: 3936632 • Letter: H

Question

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>Lets find something</button></td>
   </tr>

and javascript code:

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

   }
  

Explanation / Answer

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>Lets find something</button></td>
</tr>
</table>
</body>
</html>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote