これはJavaScriptでprintfデバッグするためのレイヤーを生成するスクリプトです。
移動可能なレイヤーに文字列を表示します。
レイヤーのposition属性がFirefox、Operaではfixedですが、Internet Explorerではabsoluteとなっています。
Internet Explorerでこのスクリプトを使うにはprototype.conio.netのprototype.jsが必要です。(Firefox、Operaでは不要)
Firefox1.5.0.1、opera8.52、Internet Explorer6で動作確認しています。
var debug = new WdfDebug();
debug.print("デバッグ");
| パラメータ | 意味 | 型 | デフォルト値 |
|---|---|---|---|
top |
レイヤーの位置 | 文字列 | 50px |
left |
レイヤーの位置 | 文字列 | 50px |
width |
レイヤーの幅 | 文字列 | 60% |
height |
レイヤーの高さ | 文字列 | 320px |
color |
文字列の色 | 文字列 | #ddd |
backgroundColor |
背景色 | 文字列 | #000 |
zIndex |
レイヤーのz-index | 整数 | 100 |
var debug = new WdfDebug();
debug.top = '250px';
debug.left = '100px';
debug.width = '500px';
debug.height = '400px';
debug.color = 'black';
debug.backgroundColor = 'white';
debug.zIndex = 200;
debug.print('デバッグ');
ver 1.0 (2006/3/3)