JavaScript uses functions to set and modify the innerHtml and innerText attributes of the div box—–JavaScript

<!DOCTYPE html> <!– This is an HTML comment –> <html lang=”en” id=”myHtml”> <head> <!– This does not set the encoding, but tells the browser what encoding method to use to open the file to avoid garbled characters –> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <title>HtmlAll</title> <style type=”text/css”> #div1{ background-color: aquamarine; width: 300px; height: 300px; border: […]

Bug resolved: TypeError: Cannot set property innerHTML of null

Blogger Maotouhu () takes you to Go to New World? Blog homepage: Maotouhu’s blog “Complete Column of Interview Questions” Articles with pictures and texts Vivid images Simple and easy to learn! Everyone is welcome to step in~ “IDEA Development Cheats Column” Learn the common operations of IDEA and double your work efficiency~ “Master Golang in […]

The difference between append, appendChild and innerHTML of JavaScript, getTime, createElement, createTextNode

Article directory append appendChild innerHTML the difference performance case createTextNode createElement getTime append MDN The Element.append method inserts a set of Node objects or DOMString objects after the last child node of the Element. The inserted DOMString object is equivalent to a Text node. Differences from Node.appendChild(): Element.append() allows appending DOMString objects, while Node.appendChild() only […]

JS-10 DOM Tree, document object, Node node navigation, table element navigation, DOM acquisition element, nodeType, nodeName, tagName, innerHTML, textContent

Table of Contents 1_DOM and BOM Introduction 1.1_DOM 1.2 Understanding of DOM Tree 1.3 Learning order of DOM 1.4 Inheritance diagram of DOM 1.5_document object 2_Navigation of nodes 3_Navigation of table elements (used less) 4_Methods of getting elements 5_node properties 5.1_nodeType 5.2_nodeName, tagName 5.3_innerHTML, textContent, nodeValue 5.4_Other properties 1_Introduction to DOM and BOM I learned […]

The web realizes the mutual conversion between the calendar and the Gregorian calendar, npm, push, unshift, includes, innerHTML

Article directory 1. Native web implementation renderings html JavaScript style vue2 implementation html JavaScript 1. Native web implementation Effect image html <div class=”box”> <div class=”week”> <div>Sunday</div> <div>Monday</div> <div>Tuesday</div> <div>Wednesday</div> <div>Thursday</div> <div>Friday</div> <div>Saturday</div> </div> <div class=”calendar_box”> <div id=”idBox” class=”calendar”></div> </div> \t <div class=”y_m_box”> <div id=”idShow” class=”show_box”></div> <div id=”idMBtn” class=”m_btn_box”></div> <div id=”idYBtn” class=”y_btn_box”></div> </div> </div> JavaScript // […]