<!-- -->这个不是xhml的注释吗,这里是怎么用的,我见有的地方用/* */ 这个注释方法

解决方案 »

  1.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <title> 
    脚本语言 
    </title> 
    </head> 
    <body bgcolor="#cccccc"> 
    页面主体部分 
    <script language="JavaScript"> document.write(" <strong>脚本内容 </strong>");</script> </body> 
    </html> 
      

  2.   

    你的代码确实运行成功了
    书上边为什么加<!-- -->,是印刷错误吗,我的把注释去掉还是不行,我在比较比较,看看错误到底在那
      

  3.   

    <!-- -->
    注释防止 不支持js的浏览器就会把js代码显示出来
      

  4.   

    <!--
    document.write("<strong>脚本内容</strong>");
    -->
    这段代码既能当注释又能去执行?