1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
<script langage="javascript">
function testchange (id) {
if (id==1)
{document.getElementById("test").innerHTML='test 1';}
else
{document.getElementById("test").innerHTML='test 2';}
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label>
<input type="radio" name="radio" id="radio" value="radio" onchange="testchange(1)"/>
</label>
<p>
<label>
<input type="radio" name="radio" id="radio2" value="radio" onchange="testchange(2)"/>
</label>
</p>
</form>
<div id="test"></div>
</body>
</html> |