2008-12-08 17:05
请在body里加一句
onLoad="document.onclick = function XXX(event)"
因为准备用document.onclick = function XXX(event)
报错说找不到event,写到body里,省点事好了.
最新的试过了可以用
document.onclick =abcd; function abcd(event) { event = (event == null)?window.event:event; } document.onkeydown = function(event){ event = event? event:window.event; if(event.keyCode == 27){ window.close(); } } event = (event == null)?window.event:event; srcelement= event.target?event.target:event.srcElement;
顺便写一下firefox和ie获取srcElement