📄 xwindow.js
字号:
function _xwindow()
{
var _db = new Array();
var _s = 0;
this.title = "xwindow";
this.hasLogo = false;
this.logo = null;
this.content = null;
this.width = 150;
this.height = 200;
this.attach = function(a, p)
{
_db[_s++] = Array(a, p);
}
this.remove = function()
{
while (_s) _s--;
_db = new Array();
}
this.open = function()
{
var html = '<html>'
+ '<head>'
+ '<title>'+ this.title +'</title>'
+ '<style><!--'
+ '.{font-size: 12px}'
+ 'table {table-layout: fixed; word-wrap:break-word;}'
+ '--><!--/style>'
+ '</head>'
+ '<body topmargin="3" leftmargin="3">'
+ '<table width="100%" border="0" cellspacing="0" cellpadding="1">';
if (this.hasLogo==true)
{
html += '<tr><td align="center"><img src="'+ this.logo +'" border="0" /></td></tr>';
}
html += '<tr><td align="center">'+ this.title +'</td></tr>';
if (!isEmpty(this.content))
{
html += '<tr><td align="center">'+ toHTML(this.content) +'</td></tr>';
}
for (var i=0; i<_db.length; i++)
{
html += '<tr><td align="'+ _db[i][0] +'">'+ _db[i][1] +'</td></tr>';
}
html += '</table>'
+ '</body>'
+ '</html>';
var op = window.open('','xwindow','width='+ this.width +',height='+ this.height +',top='+ (screen.height - this.height)/2 +',left='+ (screen.width - this.width)/2 +',toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no');
op.document.open('text/html','replace');
op.document.write(html);
op.document.focus();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -