解决方案 »
- document.execCommand(”saveAs”) ie另存为 保存对话框问题
- 麻烦看个正则表达式var urlExp = /https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?/;
- 类似csdn论坛鼠标放在楼主头像上弹出层,并且可以复制层里内容
- 原型模式
- 哪位有Json 轻量级格式化工具
- 求助 表格按键换格操作
- 超郁闷的问题,100分请教!怎样才能让iframe中的history.back(1)不影响父窗口?
- 关于正则式,请大侠相助???
- 盒中盒
- 微软的最新安全补丁禁止使用HHCtrl关闭窗口了
- 如何改变有框架网页的标题~
- 求教JS编写复制输入框中的NAME属性?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> 无标题文档 </title>
<style>
#chaborder td{
width:200px;height:200px;text-align:center
}
#chaborder a{
display:block; width:200px;height:200px;OVERFLOW: hidden; cursor:default;
}
#chaborder a:hover{width:198px;height:198px;border:1px solid #f00}
#chaborder img{border:0}
.ahover{width:198px;height:198px;border:1px solid #f00}
.aout{display:block; width:200px;height:200px;OVERFLOW: hidden; cursor:default; }
body {
background-color: #00CC00;
}
</style>
<script type="text/javascript">
function MoveCursor(obj){
var row = parseInt(obj.id.substring(1,2));
var col = parseInt(obj.id.substring(2,3));
alert(event.keyCode)
switch(event.keyCode){
case 37:
if(col > 1)
col--;
break;
case 38:
if(row > 1)
row--;
break;
case 39:
if(col < 3)
col++;
break;
case 40:
if(row < 3)
row++;
break;
case 13:
alert(obj.id);//如果要其他属性改属性名即可,也可以调用函数传递对象或属性名到其他地方去处理
break;
}
obj = document.getElementById("a" + row.toString() + col.toString());
obj.click();
obj.focus();
obj.className = "ahover";
status = obj.innerText;
}
</script>
</head>
<body>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="600"> <table width="600" border="0" cellspacing="0" cellpadding="0" id="chaborder">
<tr>
<td> <a id="a11" href="#" onmouseover="this.focus();" onkeydown="MoveCursor(this);" onblur="this.className='aout'"></a> </td>
<td> <a id="a12" href="#" onmouseover="this.focus();" onkeydown="MoveCursor(this);" onblur="this.className='aout'"></a> </td>
<td> <a id="a13" href="#" onmouseover="this.focus();" onkeydown="MoveCursor(this);" onblur="this.className='aout'"></a> </td>
</tr>
<tr>
<td> <a id="a21" href="#" onmouseover="this.focus();" onkeydown="MoveCursor(this);" onblur="this.className='aout'"></a> </td>
<td> <a id="a22" href="#" onmouseover="this.focus();" onkeydown="MoveCursor(this);" onblur="this.className='aout'"></a> </td>
<td> <a id="a23" href="#" onmouseover="this.focus();" onkeydown="MoveCursor(this);" onblur="this.className='aout'"></a> </td>
</tr>
<tr>
<td> <a id="a31" href="#" onmouseover="this.focus();" onkeydown="MoveCursor(this);" onblur="this.className='aout'"></a> </td>
<td> <a id="a32" href="#" onmouseover="this.focus();" onkeydown="MoveCursor(this);" onblur="this.className='aout'"></a> </td>
<td> <a id="a33" href="#" onmouseover="this.focus();" onkeydown="MoveCursor(this);" onblur="this.className='aout'"></a> </td>
</tr>
</table> </td>
</tr>
</table>
</body>
</html>
alert(obj.id);
屏蔽闭掉旧好了啊
jf jf
jf