HTML קוד:
<form name="form" action="" method="post">
<input type="text" name="q" size="20" maxlength="80" /><br />
<input type="radio" name="site" value="search.php" checked="checked" onclick="document.form.action=this.value;alert(document.form.action);" /> Site <br />
<input type="radio" name="site" value="http://www.google.co.il/search?hl=iw" onclick="document.form.action=this.value;alert(document.form.action);" /> Google <br />
<input type="submit" value="חיפוש" />
</form>