oncheck checkbox javascript
<input type='checkbox' onchange='handleChange(this);'> Checkbox
function handleChange(checkbox) {
if(checkbox.checked == true){
document.getElementById("submit").removeAttribute("disabled");
}else{
document.getElementById("submit").setAttribute("disabled", "disabled");
}
}<script type=text/javascript>
function validate(){
if (remember.checked == 1){
alert("checked") ;
} else {
alert("You didn't check it! Let me check it for you.")
}
}
</script>
<input id="remember" name="remember" type="checkbox" onclick="validate()" />
Also in JavaScript:
- how to freeze js object
- global scope js
- get today date and time in js
- to capital case javascript
- update cypress
- how to create dynamic classes in tailwind typescript react
- Modify the function increment by adding default parameters so that it will add 1 to number if value is not specified.
- how to remove an object from array in react native
- javascript how to raise the error
- how to create array in javascript
- javascript replace p tags with new line
- how to set background colour i js inline stylel
- less than equal to in javascript
- js remove json value duplicates
- enviando post angular 8
- reactnode prop-types
- A fatal JavaScript error has occurred. Should we send an error report
- JavaScript Operators
- javascript log to console
- kill all node processes
- remove property mongodb
- javascript scroll to bottom of div
- samesite cookie nodejs
- Javascript remove array item by value