在相应的地方加alert() 或者debugger;

解决方案 »

  1.   

    一般情况 firebug 有时用 visual studio 2005
      

  2.   

    阿弥陀佛,一直用 divOutput.innerHTML 输出调试信息,alert 会影响事件顺序!
      

  3.   

    ff firebug, 不过这东西太容易把FF当掉..
    IE, Microsoft Debuggershawl.qiu javascript url notebook.---/-------------------------------------------------------------目录:1. document.getElementById
    2. 显示页面源代码
    3. rot13
    4. 高亮标签
    5. JS 调试器---/-------------------------------------------------------------内容:5. JS 调试器
    javascript:w=window.open(null,document.body.uniqueID);w.document.write('<title>JS Debugger</title><textarea style="width:100%;height:48%;" onblur="try{jsoutput.value=opener.eval(this.value);jsoutput.focus()} catch(err){jsoutput.value=\'(compile error)\\n\'+err.description}" wrap=off></textarea><br><textarea id=jsoutput style="font-family:monospace;font-size:smaller;width:100%;height=48%" wrap=off></textarea>');undefined4. 高亮标签
    javascript:tp=prompt("What%20tag%20shall%20I%20un/highlight?","td");els=document.getElementsByTagName(tp);if(!window.tps)tps={};if(tps[tp]){for(i=0,len=els.length;i<len;i++)els[i].style.border='';tps[tp]=0}else{for(i=0,len=els.length;i<len;i++)els[i].style.border="1px%20solid%20red";tps[tp]=1}void(0)3. rot13
    javascript:rot="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";tor="nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM".split('');function Rot13(str){var i,len,x;for (i=0,str=str.split(''),len=str.length;i<len;i++) if ((x=rot.indexOf(str[i]))>-1) str[i]=tor[x];return str.join('');}document.body.innerHTML=document.body.innerHTML.replace(/(>|^)[^<]+/g,Rot13).replace(/&[a-zA-Z]+;/g,Rot13).replace(/value="([^"]+)/gi,function(a,b){return 'value="'+Rot13(b)});void(0);2. 显示页面源代码
    javascript:void(open("javascript:'<xmp><HTML>'+opener.document.documentElement.innerHTML+'</HTML></xmp>'"));1. document.getElementById
    javascript:alert(document.body.innerHTML)
    javascript:alert(document.cookie)
    javascript:alert(document.getElementById("UbbDecodeMain").innerHTML)
    javascript:alert(document.getElementById("UbbDecodeMain").innerHTML.match(/\r\n/g))
    javascript:alert(document.getElementById("HlMainIdInputIframeId").contentWindow.document.body.innerHTML);
    javascript:alert(document.getElementById("HlMainIdOutputIframe").contentWindow.document.body.innerHTML);
      

  4.   

    Microsoft Debugger我这边怎么老使不了,IE里面的设置了允许调试,还是不行 
    不知道为什么?
      

  5.   


    try{
        //代码块
    }catch(e){
        alert(e.description);
    }
      

  6.   

    FF firebug; IE: vs2005, Office2003:脚本调试器。