Enable Submit Button JavaScript
This javascript will help you to enable or disable submit button whenever you click the checkbox.
Features
- You can enable or disable submit button with the help of checkbox using javascript
- Just copy the code into your page and use it.
Preview
Downloads
Javascript <!--Script by hscripts.com-->
<!-- More scripts @ https://www.hscripts.com -->
<script type="text/javascript">
function apply()
{
document.frm.sub.disabled=true;
if(document.frm.chk.checked==true)
{
document.frm.sub.disabled=false;
}
if(document.frm.chk.checked==false)
{
document.frm.sub.enabled=false;
}
}
</script>
<!-- Script by hscripts.com -->
HTML Code
<!-- Script by hscripts.com -->
<form name="frm">
<table style="border:solid green 1px">
<tr><td align=center><input type="checkbox" name="chk" onClick="apply()"></td></tr>I agree Terms and Conditions
<tr><td align=center><input type="button" name="sub" value="submit" disabled></td></tr>
<tr><td align=center>©<a href="https://www.hscripts.com" style="color:#3D366F;text-decoration:none;cursor:pointer;font-size:13px">hscripts.com</a></td></tr></table>
</form>
<!-- Script by hscripts.com -->
- Release Date - 07-04-2008
- Get free version without ©copyright link for just $10/-
- For customization of this script or any script development, mail to support@hscripts.com
Usage
- The above program is used to enable the submit button. The checkbox is checked, to enable the sumbit button otherwise its disabled.
- The function apply() is called to enable the submit button.
- Copy the code into your page and use it.
License
Related Scripts