removeAttribute () I know I can delete the attribute on the tag, but after adding the attribute of checked to the input tag through JavaScript, then call the removeAttribute () method, why can"t I delete it? Is there a big boss to help explain?
<input type="checkbox" id="input">removeAttribute()
<script>
var input = document.getElementById("input");
input.checked=true;
input.removeAttribute("checked");
//checked(),domchecked
input.class="demo";
input.removeAttribute("class");
//class
</script>