滑动门中是否可以加入滚动代码,请高手指点一下
下面代码中红色部分是滚动代码,我把滚动代码加入滑动门中,则产生冲突现象,当刷新网页后刚开始是正常的 滚动代码能显示滚动 当把鼠标放在滑动门按纽上 滚动部分就消失了
效果见http://www.
当刷新网页后刚开始是正常的 滚动代码能显示滚动 当把鼠标放在供应信息上 滚动部分就消失了
<div id="zxsj">
<table width="566" height="252" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10" height="27" background="zymh051.gif"> </td>
<td width="496"><ul class="TabBarLevel201" id="TabPage301">
<li id="Tab305" class="Selected"><a href="#" onfocus="this.blur()" onmouseover="javascript:switchTab301('TabPage301','Tab305');">供应信息</a></li>
<li id="Tab306"><a href="#" onfocus="this.blur()" onmouseover="javascript:switchTab301('TabPage301','Tab306');">求购信息</a></li>
</ul></td>
<td width="60" align="center" background="zymh051.gif"><img src="zymh058.gif" width="40" height="20" border="0"></td>
</tr>
<tr>
<td height="225" colspan="3" valign="bottom"><div id="cnt301">
<div id="dTab30" class="HackBox201" style="display:block;"><table width="100%" height="225" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="200">
<DiV id=demo onmouseover=ii=1 style="OVERFLOW:hidden;HEIGHT:200px"
onmouseout=ii=0><DiV id=demo1>
<%
set rs = Server.CreateObject("ADODB.Recordset")
sql = "select top 9 * from xza where color = 'ffffff' order by id desc"
rs.Open sql,conn,1,1
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<% do while not rs.eof %>
<tr>
<td height="25"><%= rs("name")%></td>
</tr>
<%
i = i + 1
rs.MoveNext
Loop
rs.Close()
%>
</table></DiV><DiV id=demo2></DiV>
<SCRIPT>
var ii=0;t=demo.scrollTop
demo2.innerHTML=demo1.innerHTML
function qswhMarquee(){
if (ii==1)return
if(demo2.offsetTop-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight
else
demo.scrollTop++
}
setInterval(qswhMarquee,30)
</SCRIPT></DiV>
</td>
</tr>
</table></div>
<div id="dTab306" class="HackBox201">22</div>
</div></td>
</tr>
</table>
</div>
<script language="JavaScript">
//Switch Tab Effect
function switchTab301(tabpage301,tabid){
var oItem = document.getElementById(tabpage301);
for(var i=0;i<oItem.children.length;i++){
var x = oItem.children(i);
x.className = "";
var y = x.getElementsByTagName('a');
y[0].style.color="#000000";
}
document.getElementById(tabid).className = "Selected";
var dvs=document.getElementById("cnt301").getElementsByTagName("div");
for (var i=0;i<dvs.length;i++){
if (dvs[i].id==('d'+tabid))
dvs[i].style.display='block';
else
dvs[i].style.display='none';
}
}
</script>
经过反复查找 是var dvs=document.getElementById("cnt301").getElementsByTagName("div");中div名字重复了引起的 但不知如何修改 请大家帮帮忙该如何修改 谢谢了
[ 本帖最后由 abeier009 于 2010-7-16 14:55 编辑 ]