diff options
-rw-r--r-- | html.md | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -0,0 +1,24 @@ +# HTML stuff + +## DOM manipulation + + // create new element + document.createElement('button') + + // append child + element1.appendChild(element2) + +## Elements + +### Button + +By default, a button has type `reset` or `submit`, both of which reload the +page. To avoid reloading: + + <button type='button'></button> + +### Checkbox + +To check by default: + + <input type='checkbox' checked> |