Ребят помогите, в Google Chrome и в FireFox работает нормально, а в IE и Opera вообще никак.
<html>
<head>
<title>111</title>
<script language="javascript" src="library.js"></script>
<script language="javascript">
<!--
zindex=0 ;
function fixEvent(event) {
event = event || window.event
if ( event.isFixed ) {
return event
}
event.isFixed = true
event.preventDefault = event.preventDefault || function(){this.returnValue = false}
event.stopPropagation = event.stopPropagaton || function(){this.cancelBubble = true}
if (!event.target) {
event.target = event.srcElement
}
if (!event.relatedTarget && event.fromElement) {
event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
}
if ( event.pageX == null && event.clientX != null ) {
var html = document.documentElement, body = document.body;
event.pageX = event.clientX + (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0);
event.pageY = event.clientY + (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0);
}
if ( !event.which && event.button ) {
event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
}
return event
}
function ffunc(event) {
zindex++
event = fixEvent(event)
var div_element = document.createElement('table') ;
div_element.style.zIndex = zindex ;
div_element.style.marginTop = event.pageY ;
div_element.style.marginLeft = event.pageX ;
div_element.style.position = "fixed" ;
div_element.style.backgroundColor = 'green' ;
div_element.style.borderSpacing = 1 ;
div_element.innerHTML = '<tr><td style="background-color: yellow ; margin: 0 ; padding: 0 ;" width=2 height=2></td></tr>' ;
document.body.appendChild(div_element)
}
-->
</script>
</head>
<body id="body" style="padding: 0 ; margin: 0 ;" onmousemove="ffunc(event)"></body>
</html>