<Html> <pead> <title> use javascript to dynamically comment out HTML code-51windows. net </title> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "> </pead> <body> <table border =" 1 "width =" 100% "> <tr> <td width =" 50% "> 1 </td> <td width = "50%"> 2 </td> </tr> <td width = "50%"> 3 </td> <td width = "50% "> 4 </td> </tr> <td width =" 50% "> 5 </td> <td width =" 50% "> 6 </td> </tr> <td width = "50%"> 7 </td> <td width = "50%"> 8 </Td> </tr> </table> <p> you didn't see 34 cells, because he commented out in javascript. How did he do it? View Source file! What are the source files? Right-click and select "View Source file (V )"... </p> <p style = "color: red;"> Note: html comments cannot be added to dynamic comments. "<! --> ", <Script> and </script> are not allowed." <! -- "And" // --> "</p> <p> in addition to this method, you can also use document. getElementById ("xx "). style = "none"; this method dynamically displays or hides a region </p> </body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]