|
Link with Buttons
Bored of ordinary links? Then try using buttons. This can
work well if there are a series of them lined up in a navigation
bar especially if you using image backgrounds or CSS styles
to make them look good.
First of all, there is the script that goes into the <head>
of your page:
<SCRIPT LANGUAGE="JavaScript">
<!--
function goToURL() { window.location = "http://javascript.internet.com/new";
}
-->
</script>
Amazingly simple. Your normal JavaScript tags with a link
function. Now for the button which goes in your pages <body>
tag:
<form>
<input type=button value="New JavaScripts" onClick="goToURL()">
</form>
You dont' need to add anything to your form attributaries
as the onClick javascript activates the script. Sumple hu?
|