http://lovingu.rozblog.com/page/26a
کد:
<script type="text/javascript">function open_target_site()
{
var radio_group = document.forms["target_form"].target_site;
for(i=0; i<radio_group.length; i++)
{
if(radio_group.checked)
window.location = radio_group.value;
}
}
</script>
<form name="target_form" onsubmit="open_target_site(); return false">
<input name="target_site" value="http://www.google.com" type="radio" />
ورود به سایت گوگل <br>
<input name="target_site" value="http://www.yahoo.com" type="radio" />
ورود به سایت یاهو <br>
<input name="target_site" value="http://www.altavista.com" type="radio" />
ورود به سایت آلتاویستا <br>
<input type="submit" value="مشاهده سایت">
</form>