Getting Invalid_character_err: Dom Exception 5
I'm writing a simple to-do list. that a user input a text and the it's added as a checkbox. But i'm getting this error i have no idea what's it about INVALID_CHARACTER_ERR: DOM Ex
Solution 1:
document.createElement takes the tag name only as its parameter, you'll have to set the type and value after
var task = document.createElement("input")
task.type = "checkbox";
task.value = textBox.value;
Also input tags are empty, there are no closing tag or inner html, the value is set as an attribute in markup.
Post a Comment for "Getting Invalid_character_err: Dom Exception 5"