ã¿ãªããã¯ã©ããªç°å¢ã§ JavaScript ã®ãããã°ãè¡ã£ã¦ãã¾ããï¼
åã¯ä»¥ä¸ã®ãããªãã®ã使ã£ã¦ãã¾ãã
- Venkman JavaScript Debugger(Firefox)
- Microsoft Script Editor(Internet Explorer)
- DOM Inspector(Firefox)
- Web Developer(Firefox)
- Developer Toolbar(Internet Explorer)
æè¿ã¯ä¾¿å©ãªãã¼ã«ãå¢ãããã®ã§ããã
ãããããã®ãããªä¾¿å©ãªãã¼ã«ãå¢ãã¦ããã£ã±ã alert 使ãããå ´é¢ã£ã¦åºã¦ãã¾ãããã¨ãã°ã Opera ã§ã®ç¢ºèªãã«ã¼ããè¤éãã㦠alert ã¨ã使ã£ãã»ãã楽ãªå ´åãªã©ã§ãã
ã¨ã¯ããã alert ã¯ä½ãã¨ä½¿ãã«ããã®ã§ãåã¯ä»¥ä¸ã®ããã«ç°¡æãã¬ã¼ãä½ã£ã¦éçºãã¦ãã¾ãã使ã£ã¦ã¿ãã¨ããªã便å©ã§ãã
var debug = function(text) { var alerter = document.getElementById('debugAlerter'); if(alerter) { var element = document.createElement('div'); var textNode = document.createTextNode(text); element.appendChild(textNode); alerter.appendChild(element); } }; debug.prepare = function() { var body = document.body; var debugAlerter = document.createElement('div'); debugAlerter.id = 'debugAlerter'; style = debugAlerter.style; style.position = 'absolute'; style.top = '0px'; style.left = '0px'; style.color = 'red'; style.fontWeight = 'bold'; style.padding = '20px'; style.fontSize = '20px'; body.appendChild(debugAlerter); }; if (window.addEventListener) { window.addEventListener('load', debug.prepare, true); } else if (window.attachEvent) { window.attachEvent('onload', debug.prepare); }
ãã®ã³ã¼ãã使ãå ´åã¯ã³ã¡ã³ããã¦ãã