User:Mwr0/Syntax Highlight

javascript: function reportElement(event){
  atXY = document.elementFromPoint(event.clientX,event.clientY);
  alert("reportElement\nelement from (x,y)\n"+atXY.tagName);
  atXY.style.zoom=2;
  atXY.style.borderColor='Cyan';
  atXY.style.borderStyle='thin';
};
function X(){
var BODY; BODY=document.getElementsByTagName("BODY")[0];
BODY.setAttribute("onContextMenu","reportElement(event);return false;");
alert(BODY.tagName+" "+BODY.getAttribute("onContextMenu"));
};X();