<HEAD>
<STYLE type="text/css">
TD {
width:20px;
height:20px;
background-color:#ffffff;
}
TABLE {
background-color:#000000;
}
</STYLE>
<SCRIPT type="text/javascript">
var userAgent = window.navigator.userAgent.toLowerCase();
var appVersion = window.navigator.appVersion.toLowerCase();
var mouseFlg = 0;
var curColor = "#000000";
function test(ev) {
if (userAgent.indexOf("msie") > -1) {
if ( event.button == 1 ) {
event.srcElement.style.backgroundColor = curColor;
}
}
else {
if ( mouseFlg == 1 ) {
ev.currentTarget.style.backgroundColor = curColor;
}
}
}
function cancelDrag( ev ) {
if (userAgent.indexOf("msie") > -1) {
event.returnValue = false;
}
else {
ev.preventDefault();
}
}
</SCRIPT>
<HEAD>
<BODY onMousedown='mouseFlg=1' onMouseup='mouseFlg=0'>
<TABLE cellspacing=1>
<SCRIPT type="text/javascript">
for( row = 1; row <= 20; row++ ) {
document.write("<tr>");
for( i = 1; i <= 20; i++ ) {
document.write("<TD " +
" onMousemove='test(event)'"+
" onMousedown='mouseFlg=1;test(event)'"+
" ondragstart='cancelDrag(event)' ></TD>");
}
document.write("</tr>");
}
</SCRIPT>
</TABLE>
|