קוד:
<!-- TWO STEPS TO INSTALL RADIO BUTTON LINKS:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Wayne Nolting (w.nolting@home.com) -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
togo='http://hosts.co.il'
function go(loc) {
togo=loc;
//window.location.href = loc;
}
function do_go()
{
window.location.href = togo;
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<form name="form" >
<input type="radio" name="loc" onClick="go('http://javascript.internet.com/');"> JavaScript Source<br>
<input type="radio" name="loc" onClick="go('http://javascript.internet.com/toc.html');"> JSS Table of Contents<br>
<input type="radio" name="loc" onClick="go('mailto:anyone@mailserver.com');"> Contact Anyone<br>
<br>
<input type=button onClick="do_go()" value='submit'>
</form>
<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
<!-- Script Size: 1.14 KB -->
שיניתי את הסקריפט כדי שזה יעבוד כמו שאתה רוצה