以文本方式查看主题 - 中文XML论坛 - 专业的XML技术讨论区 (http://bbs.xml.org.cn/index.asp) -- 『 Dot NET,C#,ASP,VB 』 (http://bbs.xml.org.cn/list.asp?boardid=43) ---- 我的这个下拉菜单怎么放不到表格里边啊 我是新手 问题简单不要笑话啊 (http://bbs.xml.org.cn/dispbbs.asp?boardid=43&rootid=&id=49883) |
-- 作者:zx147 -- 发布时间:7/13/2007 5:44:00 PM -- 我的这个下拉菜单怎么放不到表格里边啊 我是新手 问题简单不要笑话啊 我的这个下拉菜单放不到想要的地方 我有个下拉菜单 和一个3列2行的表格 想把菜单放进第3列的第2行 可是放不进去 下面这个是下拉菜单的代码: <html> <head> <title>QQ菜单</title> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'> <script language='JavaScript'> var headHeight = 22;var bodyHeight = 202;var objcount = 3;var step = 20;var moving = false; function showme(obj1, obj2) { if (moving) return; moving = true; for(i=0;i<document.all.tags('td').length;i++) if (document.all.tags('td')[i].className.indexOf('headtd') == 0) document.all.tags('td')[i].className = 'headtd1'; obj2.className = 'headtd2'; moveme(obj1); } function moveme(obj) { idnumber = parseInt(obj.id.substr(4)); objtop = headHeight * (idnumber - 1); objbuttom = bodyHeight + headHeight * (idnumber - 2); currenttop = parseInt(obj.style.top); if (currenttop >= objbuttom) { countid = 1; for(i=0;i<document.all.tags('div').length;i++) if (document.all.tags('div')[i].id == 'item'+countid+'body') { obj = document.all.tags('div')[i]; objtop = headHeight * (countid - 1); if (countid == idnumber) { moveup(obj,objtop,false); break; } else moveup(obj,objtop,true); countid++; } } else if ((currenttop <= objtop) && (idnumber < objcount)) { idnumber++; countid = objcount; for(i=document.all.tags('div').length-1;i>=0;i--) if (document.all.tags('div')[i].id == 'item'+countid+'body') { obj = document.all.tags('div')[i]; objbuttom = bodyHeight + headHeight * (countid - 2); if (countid == idnumber) { movedown(obj,objbuttom,false); break; } else movedown(obj,objbuttom,true); countid--; } } } function moveup(obj,objtop,ismove) { currenttop = parseInt(obj.style.top); if (currenttop > objtop) { obj.style.top = currenttop - step; setTimeout('moveup('+obj.id+','+objtop+','+ismove+')',1) return; } moving = ismove; } function movedown(obj,objbuttom,ismove) { currenttop = parseInt(obj.style.top); if (currenttop < objbuttom) { obj.style.top = currenttop + step; setTimeout('movedown('+obj.id+','+objbuttom+','+ismove+')',1) return; } moving = ismove; } </script> </script> <style type='text/css'> .headtd1 { background: #ADADAD; border: 2px outset; border-color: #D8D8D8 #FFFFFF #FFFFFF #D8D8D8; cursor: hand; font-size: 9pt}.headtd2 { background: #CCCCCC; border: 2px outset; border-color: #FFFFFF #FFFFFF #FFFFFF #FFFFFF; cursor: hand; font-size: 9pt}.bodytd { background: #BBBFCE; border: 2px outset; border-color: #FFFFFF #FFFFFF #FFFFFF #FFFFFF; font-size: 9pt} </style> </head> <body bgcolor='#FFFFFF' text='#000000'> <div id='mainboard' style='position:absolute; left:2px; top:2px; width:120px; height:246px; z-index:1; overflow: hidden; background: #BBBFCE;'> <div id='item1body' style='position:absolute; left:0; top:0; width:120px; height:202px; z-index:2; overflow: hidden'><table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'><tr><td id='item1head' height='20' class='headtd2' onclick='showme(item1body,this)' align='center'>菜单1</td></tr><tr><td class='bodytd' align='center'>test</td></tr></table></div><div id='item2body' style='position:absolute; left:0; top:202; width:120px; height:202px; z-index:3; overflow: hidden'><table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'><tr><td id='item2head' height='20' class='headtd1' onclick='showme(item2body,this)' align='center'>菜单2</td></tr><tr><td class='bodytd' align='center'>test</td></tr></table></div><div id='item3body' style='position:absolute; left:0; top:224; width:120px; height:202px; z-index:4; overflow: hidden'><table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'><tr><td id='item3head' height='20' class='headtd1' onclick='showme(item3body,this)' align='center'>菜单3</td></tr><tr><td class='bodytd' align='center'>test</td></tr></table></div></body></html> 高手们随便弄个表格放进去 让我看看 原理 我是新手 不要笑话啊 弄好了把代码发我QQ邮箱里 我邮箱是109351640@qq.com |
-- 作者:zx147 -- 发布时间:7/13/2007 7:59:00 PM -- ??没人回答吗???服务不够好啊 |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
8,169.922ms |