I tried this one for some experiment and I can't seem to work it out can you help me about this?
The problem here is that when you click on the Radio button then click the result button it should give an alert with number(this number is how may times youve clicked the result button with the radio button on)
This is my code use:
<html>
<head>
<title>Online VOting System</title>
<script type="text/javascript">
function result()
{
if(document.test.myradio.checked==true)
}
for (i=1; i<=1; i++)
{
alert(i)
}
}
}
function load()
{
alert("hello")
}
</script>
</head>
<body bgcolor="#3ujkd2" OnLoad="load()">
<form name="test">
<input type="radio" name="myradio" />
<input type="radio" name="myradio2" />
<input type="button" onClick="result()" value="Result" />
</form>
</body>
</html>