JS function Document.onclick () {} error syntax error on token ' function ', delete this token
function Document.onclick ()//close the control when any click //ie6 can be replaced by the following switch focus processing
{
With (window.event)
{if (srcelement! = Outobject && srcelement! = Outbutton)
Closelayer ();
}
}
Change to:
Document.onclick=function ()//close the control when any click//ie6 can be replaced by the following switch focus processing
{
With (window.event)
{if (srcelement! = Outobject && srcelement! = Outbutton)
Closelayer ();
}
};
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
Document.onkeyup=function ()//press ESC to close, toggle focus off
{
if (window.event.keycode==27) {
if (outobject) Outobject.blur ();
Closelayer ();
}
else if (document.activeelement)
if (document.activeelement! = Outobject && document.activeelement! = Outbutton)
{
Closelayer ();
}
};
JS function Document.onclick () {} error syntax error on token ' function ', delete this token