<script src='http://www.fphs5.com/plus/mytag_js.php?aid=2' language='javascript'></script>上面的代码,保存html后,在浏览器中查看源代码呈现html的样式,怎样实现!在线等,比较急。谢谢各位高手了!

解决方案 »

  1.   

    你用火狐 按个firebug
    用firebug看 试试
      

  2.   

    你没明白意思,我是想用那段JS代码,输出html的源代码!
      

  3.   

    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <script src='http://www.fphs5.com/plus/mytag_js.php?aid=2' language='javascript'></script>
    <script type="text/javascript">
    function showSource(){
    var a=document.body.innerHTML;
    var t=document.createTextNode(a);
    var w=window.open("");
    w.document.body.appendChild(t);
    }
    </script>
    </head><body>
    <input type="button" onclick="showSource()">
    </body>
    </html>
    这样试试
      

  4.   

    在浏览器地址栏直接输入script的 src
      

  5.   

    chrome 下面按F12,选择Elements,这里都是解析完的html。
    另外firebug、IE9都有这样的工具。