id:higepon:20050602:1117724735で、書いたデバッグ方法をオブジェクト指向っぽく。 var debug = new Debug('debug', true); function Debug(target, debug) { this.target = target; this.out = function(str) { if (!debug) return; var place = document.getElementById(this.target); if (!place) return; place.value += str + "\n"; } this.clear = function() { if (!debug) return; this.value = ''; } } <textarea cols=70 rows=30 id="debug"></t