function debug_1()
{
//alert(33)
var str =
'<center><h2 style="color:red;font-size:18px;">console</h2></center>'+
'<textarea readonly="readonly" id="log_output" ' +
'style="width:99%;height:100px;background:black;color:white;font-family:\'Courier New\'">12333erw'+
'</textarea>'+
'<div>命令输入<input type="text" value="" id="c_input" style="width:400px;height:30px;font-family:\'Courier New\'" />' +
'<input type="button" value="执行" οnclick="eval(document.getElementById(\'c_input\').value)">' +
'<input type="button" value="清除控制台" οnclick="document.getElementById(\'log_output\').value=\'\';"></div>' ;
var div = document.createElement('div');
div.id = "console_id";
div.style.cssText = 'position:absolute;left:0;top:440px;display:none;' +
'background:white;border:2px solid blue;z-index:9999';
div.innerHTML = str;
//document.body.insertBefore(div,document.body.firstChild);
document.body.appendChild(div);
//alert(44)
//document.body.οnclick=function(){alert(0)}
document.body.onkeyup =function (){
//var event= g_EventUtil.getEvent();
// alert(22)
if (event.keyCode != 71)return;
//alert(event.keyCode);
if (event.altKey){
if (document.getElementById('console_id').style.display!='none')
document.getElementById('console_id').style.display='none';
else
document.getElementById('console_id').style.display='';
}
};
}
function log(text)
{
var area = document.getElementById('log_output');
area.value += '\n' + text;
area.scrollTop += area.offsetHeight;
}
//Event.observe(window, 'load', debug_1);
window.onload = debug_1; //alt + g 打开控制台
{
//alert(33)
var str =
'<center><h2 style="color:red;font-size:18px;">console</h2></center>'+
'<textarea readonly="readonly" id="log_output" ' +
'style="width:99%;height:100px;background:black;color:white;font-family:\'Courier New\'">12333erw'+
'</textarea>'+
'<div>命令输入<input type="text" value="" id="c_input" style="width:400px;height:30px;font-family:\'Courier New\'" />' +
'<input type="button" value="执行" οnclick="eval(document.getElementById(\'c_input\').value)">' +
'<input type="button" value="清除控制台" οnclick="document.getElementById(\'log_output\').value=\'\';"></div>' ;
var div = document.createElement('div');
div.id = "console_id";
div.style.cssText = 'position:absolute;left:0;top:440px;display:none;' +
'background:white;border:2px solid blue;z-index:9999';
div.innerHTML = str;
//document.body.insertBefore(div,document.body.firstChild);
document.body.appendChild(div);
//alert(44)
//document.body.οnclick=function(){alert(0)}
document.body.onkeyup =function (){
//var event= g_EventUtil.getEvent();
// alert(22)
if (event.keyCode != 71)return;
//alert(event.keyCode);
if (event.altKey){
if (document.getElementById('console_id').style.display!='none')
document.getElementById('console_id').style.display='none';
else
document.getElementById('console_id').style.display='';
}
};
}
function log(text)
{
var area = document.getElementById('log_output');
area.value += '\n' + text;
area.scrollTop += area.offsetHeight;
}
//Event.observe(window, 'load', debug_1);
window.onload = debug_1; //alt + g 打开控制台