html全局属性:http://www.w3school.com.cn/tags/html_ref_standardattributes.asp
辅助记忆:(ail1,s2,c3,t3,d4)(acdlist)(accesskey,id,lang|style,spellcheck|class,contenteditable,contextmenu|title,tabindex,translate|data-*,dir,draggable,dropzone)
(字母为属性首字母,数字为个数);
陌生:
1.hidden属性
<!DOCTYPE HTML> <html> <head> <title>Example</title> <script> var toggleHidden = function() { var elem = document.getElementById("toggle"); if (elem.hasAttribute("hidden")) { elem.removeAttribute("hidden"); } else { elem.setAttribute("hidden", "hidden"); } } </script> </head> <body> <button onclick="toggleHidden()">Toggle</button> <table> <tr><th>Name</th><th>City</th></tr> <tr><td>Adam Freeman</td><td>London</td></tr> <tr id="toggle" hidden><td>Joe Smith</td><td>New York</td></tr> <tr><td>Anne Jones</td><td>Paris</td></tr> </table> </body> </html>