function document.onclick(){
with(window.event.srcElement){
if (tagName != "INPUT" && getAttribute("Author") != "tiannet")
tiannetHideControl();
}
}
//按ESC键关闭该控件
function document.onkeypress(){
if( event.keyCode == 27 ){
tiannetHideControl();
}
}
js严格模式下不允许用with,不要用with就行了,把省略的代码补回删掉with代码块就行。比如
var s = window.event.srcElement;
if (s.tagName != "INPUT" && s.getAttribute("Author") != "tiannet")
tiannetHideControl();
供参考