日期:2014-05-19  浏览次数:20414 次

JavaScript可以控制表格吗?比如慢慢展开,最好给个例子.
可以控制吗?最好给我个例子,JavaScript不是很了解,各位哥哥姐姐帮忙啊

------解决方案--------------------
大致思路是先把TABLE放在那 再用个层 慢慢移动……
------解决方案--------------------
帮顶
------解决方案--------------------
帮顶..
------解决方案--------------------
<script language= "javascript " type= "text/javascript ">
function test()
{

t1();
}
function t1()
{
var tb1 = document.getElementById( "tb1 ");
tb1.height +=5;
setTimeout( "t1() " , 100);
}
</script>
<body onload= "test() ">
<table id=t1 >
.....
</table>
------解决方案--------------------
<script language= "JavaScript ">
var act;
function over(){
var h = parseInt(mytd.height);
if (h < 164){
mytd.height = h + 2;
clearTimeout(act);
act = setTimeout( 'over() ', 10);
}
}
function out(){
var h = parseInt(mytd.height);
if (h > 30){
mytd.height = h - 2;
clearTimeout(act);
act = setTimeout( 'out() ', 10);
}
}
</script>
<table width= "316 " height= "30 " border= "2 " cellpadding= "0 " cellspacing= "0 " id= "mytd " onMouseOver= "over() " onMouseOut= "out() ">
<tr>
。。。。。具体内容。。。。。
</tr>
</table>
------解决方案--------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN ">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME= "Generator " CONTENT= "EditPlus ">
<META NAME= "Author " CONTENT= " ">
<META NAME= "Keywords " CONTENT= " ">
<META NAME= "Description " CONTENT= " ">
</HEAD>

<BODY>
<script language= "javascript " type= "text/javascript ">
function tbhi()
{
var tb1 = document.getElementById( "tb1 ");
tb1.height = parseInt(tb1.height) + 5;
setTimeout( "tbhi() " , 1500);
}
</script>
<body>
<table id= "tb1 " height= "25 " width= "200 " bgcolor= "#FF3300 ">
<tr>
<td> Test> > > > > > > > > </td>
</tr>
</table>
<script> tbhi(); </script>
</BODY>
</HTML>