jetalomar
March 19th, 2004, 11:09
what is wrong with this code. This is what is happening when i click on the radio button is display the message on a new page and I want it to display in the same page.
what AM I doing wrong?
here is the code
<html>
<head>
<script type="text/javascript">
function check(brow)
{
document.write("your broswer is " + brow);
}
</script>
</head>
<body>
<form>
Which browser is your favorite<br>
<input type="radio"
name="browser" onclick="check(this.value)"
value="Explorer">Microsoft Internet Explorer<br>
<input type="radio"
name="browser" onclick="check(this.value)"
value="Netscape">Netscape Navigator<br>
</form>
<script type="text/javascript">
check(browser);
</script>
</body>
</html>
what AM I doing wrong?
here is the code
<html>
<head>
<script type="text/javascript">
function check(brow)
{
document.write("your broswer is " + brow);
}
</script>
</head>
<body>
<form>
Which browser is your favorite<br>
<input type="radio"
name="browser" onclick="check(this.value)"
value="Explorer">Microsoft Internet Explorer<br>
<input type="radio"
name="browser" onclick="check(this.value)"
value="Netscape">Netscape Navigator<br>
</form>
<script type="text/javascript">
check(browser);
</script>
</body>
</html>