This is because there is no such property named target
in the DOM interface of the input
element.
input
elements don't have a target
attribute, only a formtarget
(and equivalently there's the formTarget
property). I'm not sure what the purpose of your "target" is in your code, but a formTarget is a reference to an ID of a form:
The target and formtarget content attributes, if specified, must have values that are valid browsing context names or keywords.
The target of an element is the value of the element's formtarget attribute, if the element is a submit button and has such an attribute; or the value of its form owner's target attribute, if it has such an attribute; or, if the Document contains a base element with a target attribute, then the value of the target attribute of the first such base element; or, if there is no such element, the empty string.
If your "target" is for another purpose, use a data-* attribute to store the value (i.e.data-target="Checkbox6"
).