// Enable and Disable submit button when click on radio button
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p>
<label>
<input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_0" onclick="form1.b1.disabled=false" />
yes</label>
<br />
<label>
<input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_1" onclick="form1.b1.disabled=true" />
no</label>
</p>
<p>
<input type="submit" name="b1" id="b1" value="Submit"
disabled="disabled" />
</p>
</form>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p>
<label>
<input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_0" onclick="form1.b1.disabled=false" />
yes</label>
<br />
<label>
<input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_1" onclick="form1.b1.disabled=true" />
no</label>
</p>
<p>
<input type="submit" name="b1" id="b1" value="Submit"
disabled="disabled" />
</p>
</form>
</body>
</html>
No comments:
Post a Comment