Home >Web Front-end >JS Tutorial >A brief discussion on the createElement event in javascript_Basic knowledge
createElement is a concept in HTML that uses the W3C DOM object model to create child nodes, that is, child elements
Note: value is actually a character. If input.value=value*1 1; is replaced by input.value=value 1;, the result will be 111111. It keeps adding 1 in the form of characters, so at this time Value*1 can convert the value value into Int type.
Summary:
To finally solve the compatibility problem of the createElement method, you still need to pay attention to the browser. For IE, you can use its unique method of passing a legal HTML code string as a parameter to createElement. Non-IE browsers still use it. Standard approach to W3C specifications.