<HTML><HEAD><script>
function f1()
{
document.all.div1.style.display="block";
}
</script>
</HEAD>
<body onclick="f1()" topMargin="0" leftmargin=0>
<form id="Form1" method="post" runat="server">
<div align=center style="POSITION:absolute;TOP:100px" >
<TABLE id="Table1" height="200" cellSpacing="1" cellPadding="1" width="712" border="1">
<TR>
<TD width="50%">aa
</TD>
<TD align="middle" width="50%">
<TABLE id="Table2" cellSpacing="0" borderColorDark="#ffffff" cellPadding="0" width="98" borderColorLight="#ff0000" border="1" height=100 bgcolor=#ffff99>
<TR>
<TD>click</TD>
</TR>
<TR>
<TD> </TD>
</TR>
<TR>
<TD> </TD>
</TR>
</TABLE> </TD>
</TR>
</TABLE>
</div>
<div id=div1 style="position:absolute; top:100; left:400; color:red; background-color:black; display:none">
<table height=200 width=200>
</table>
</div>
</form>
</body></HTML>
function f1()
{
document.all.div1.style.display="block";
}
</script>
</HEAD>
<body onclick="f1()" topMargin="0" leftmargin=0>
<form id="Form1" method="post" runat="server">
<div align=center style="POSITION:absolute;TOP:100px" >
<TABLE id="Table1" height="200" cellSpacing="1" cellPadding="1" width="712" border="1">
<TR>
<TD width="50%">aa
</TD>
<TD align="middle" width="50%">
<TABLE id="Table2" cellSpacing="0" borderColorDark="#ffffff" cellPadding="0" width="98" borderColorLight="#ff0000" border="1" height=100 bgcolor=#ffff99>
<TR>
<TD>click</TD>
</TR>
<TR>
<TD> </TD>
</TR>
<TR>
<TD> </TD>
</TR>
</TABLE> </TD>
</TR>
</TABLE>
</div>
<div id=div1 style="position:absolute; top:100; left:400; color:red; background-color:black; display:none">
<table height=200 width=200>
</table>
</div>
</form>
</body></HTML>
解决方案 »
- 求助属性 :FF下 jquery取不到html()
- 调用"Ext.form.FormPanel"对象的“form”返回的是什么类型的对象啊
- JAVA中String的replaceAll对于正则是全局的? 就是说相对于javascript的正则用了/g的参数
- ie6 动态添加option 不显示?
- extjs如何渲染一个已经在html中存在得textfield?
- 如何比较两人日期哪个前哪个后?
- 寻找一个完整的检查邮件输入格式的函数
- this.window.close()
- 如何在Iframe中的页面调用parent的函数?(急)
- 新手小白超简单问题
- 总结出了动态创建表格的方法,共享之
- 想实现一种拖拽效果请教大家,请高手指教!!!!!!!!!!!!!
<button onclick='fHide()'>hide</button>
<script>
var T=document.createElement("TABLE");
T.setAttribute("border","1");
document.body.appendChild(T);
for(var i=0;i<10;i++)
{
var r=T.insertRow(i)
for(var j=0;j<5;j++)
r.insertCell(j).innerHTML="blueDestiny, never-online";
}
function fHide() {
var w=T.offsetWidth;
var h=T.offsetHeight;
var l=T.offsetLeft;
var t=T.offsetTop;
var d=document.createElement("DIV");
d.style.backgroundColor='#eeeeee';
d.style.position="absolute";
d.style.width=w;
d.style.height=h;
d.style.left=l;
d.style.top=t;
d.innerHTML='blueDestiny, never-online';
document.body.insertBefore(d,T);
}
</script>
</body>
我是想要一个扩展型的方法,不管Table放在哪个单元格里只要点击了Table就用层遮住
<body>
<TABLE border=1 id=t2>
<TR>
<TD>a</TD>
<TD>a</TD>
<TD>a</TD>
<TD>a</TD>
<TD>a</TD>
</TR><TR>
<TD>a</TD>
<TD>a</TD>
<TD>a</TD>
<TD>a</TD>
<TD>a</TD>
</TR>
</TABLE>
<button onclick='fHide("t1")'>hide</button>
<button onclick='fHide("t2")'>hide</button>
<script>
var T=document.createElement("TABLE");
T.setAttribute("border","1");
T.id="t1";
document.body.appendChild(T);
for(var i=0;i<10;i++)
{
var r=T.insertRow(i)
for(var j=0;j<5;j++)
r.insertCell(j).innerHTML="blueDestiny, never-online";
}
function fHide(Tid) {
var T=document.getElementById(Tid);
var w=T.offsetWidth;
var h=T.offsetHeight;
var l=T.offsetLeft;
var t=T.offsetTop;
var d=document.createElement("DIV");
d.style.backgroundColor='#eeeeee';
d.style.position="absolute";
d.style.width=w;
d.style.height=h;
d.style.left=l;
d.style.top=t;
d.innerHTML='blueDestiny, never-online';
document.body.insertBefore(d,T);
}
</script>
</body>