Just record for your own study and remind yourself to stick to it.
1, document.getElementById ("id") here the ID of the parentheses is just the name of the ID, do not need to add "#"
But you can't forget the quotes. Here is a small mistake that you have made;
2, the string connection notation: a = a+b; Can be written as: a + = B; (individuals think that this may be to improve efficiency);
3, Element.onclick = function () {code}; An anonymous function is called after the element click event is triggered;
4, JS in the operation of the properties of the time is not allowed to appear in the horizontal bar "-"; For example: variable name. Style.font-size (wrong)
Should be written as: variable name. style.fontsize the same: Padding-left written paddingleft, and so on;
5, what is the keyword: JS used in the word, such as: Var, function; There are some reserved words, such as: class, do not let you use, after the JS language may be used; variable name. class== "variable name. ClassName
JS Study notes (first day)