调试js,大家都用什么工具呀 在相应的地方加alert() 或者debugger; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 一般情况 firebug 有时用 visual studio 2005 阿弥陀佛,一直用 divOutput.innerHTML 输出调试信息,alert 会影响事件顺序! ff firebug, 不过这东西太容易把FF当掉..IE, Microsoft Debuggershawl.qiu javascript url notebook.---/-------------------------------------------------------------目录:1. document.getElementById2. 显示页面源代码3. rot134. 高亮标签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. rot13javascript: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.getElementByIdjavascript: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); Microsoft Debugger我这边怎么老使不了,IE里面的设置了允许调试,还是不行 不知道为什么? try{ //代码块}catch(e){ alert(e.description);} FF firebug; IE: vs2005, Office2003:脚本调试器。 为什么这样行不通呢?本人才学,见谅。。。 JS正则表达式进行三个IF判断,最后一个不生效 帮人帮到底。。。。js很烦人啊 变量加载数据 寻求一些技术文档!! 一个关于用js动态写入html产生的问题 帮帮忙了,我想在bs_cnghsj后面加一个变量m,不知道用javascript怎么写啊??谢谢各位le 简单问题!!! 求助:js某个输入框中回车提交事件,用户在页面输入后按回车进行搜索查询 select问题 求jquery上传插件 jsp中使用combox控件与div的运用问题
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);
不知道为什么?
try{
//代码块
}catch(e){
alert(e.description);
}