Simple example of adding and removing HTML nodes Simple example of adding and removing HTML nodes <input type="button" onclick="appendnode()" value="Add node"> <input type="button" onclick="removenode()" value="Delete node"> <div id="result"></div> <script> i=0 function appendnode() { o=document.createElement("DIV"); o.innerHTML="test" i document.getElementById('result').appendChild(o); i } function removenode(){ var x = document.getElementById('result'); x.removeChild(x.lastChild) //Delete from the last node } </script> |
<<: Pitfalls based on MySQL default sorting rules
>>: Example of how to set up a multi-column equal height layout with CSS
<br />The information on web pages is mainly...
1. Python automatically runs at startup Suppose t...
1. Inline reference: used directly on the label, ...
Preface When creating a primary and foreign key f...
Three knowledge points: 1. CSS descendant selecto...
MySQL uses triggers to solve the row limit of the...
We know that in general, a function must be calle...
1. <div></div> and <span></s...
1. nohup Run the program in a way that ignores th...
This article records the installation and configu...
1. HTML code Copy code The code is as follows: Ex...
1. Use the df command to view the overall disk us...
A set of projects for training react+ts Although ...
I call this kind of bug a typical "Hamlet&qu...
Table of contents Case Context switching overhead...