Hi guys
Need your help!
I am learning Javascript with an online school and got stuck for a few hours on this : ( I know it must dead simple and not enough to stimulate your brain)
Write a JavaScript program that will accept a url from a user using an input box. The program should then transport the user to the url using the Location object with the “href” method.
<SCRIPT LANGUAGE=”JavaScript”>
<!–hide from older browsers
function location.href.url()
{
Var url = form_site.url.value;
}
//–>
</SCRIPT>
</HEAD>
<BODY>
<form method=”post” action=”” name=”form_site”>
Please enter below the web site address of your dream:<br>
<input type=”text” name=”url”><br>
<input type=”button” value=”submit” onClick=”javascript:location.href(‘url’)>
<input type=”reset” value=”reset”>
</form>
</BODY>