分享 : 滚动字幕, 兼容IE7, XHTML乱七八糟的标记
以前在网上下了一个,结果IE6下面运行很好,IE7 一装,一片空白
查其原因,多了一个什么 <xhtml> 的标记,在ie6没影响,ie7下面...
google一下..发现无果....都是在ie7下不兼容的
自己动手,丰衣足食.
写成控件了,丢到vs2005下面就好
<%@ Control Language= "C# " AutoEventWireup= "true " CodeFile= "你的代码文件 " Inherits= "你的类名 " %>
<span> 字幕 </span>
<div id= "roolDiv " style= "overflow:hidden; " >
<ul id= "roolUl ">
<asp:Repeater ID= "lastActiveCompany " runat= "server ">
<ItemTemplate>
<li> <a href= " <%# Eval( "你的字段名 ") %> " target= "_blank " > <%# Eval( "你的字段名 ") %> </a> </li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div>
<script language= "JavaScript " type= "text/javascript ">
var marqueesHeight=194;
var stopscroll=false;
with(document.getElementById( 'roolDiv ')){
style.height=marqueesHeight;
onmouseover = new Function( "stopscroll=true ");
onmouseout = new Function( "stopscroll=false ");
}
var hrefs = new Array();
function init(){
//解析UL代码
var ul = document.getElementById( 'roolUl ');
for(var i = 0 ;i < ul.children.length;i++)
{
hrefs[i] = ul.children[i].innerHTML;
}
//
setInterval( "scrollTop() ",600);
}
document.body.onload=init;
function scrollTop()
{
if(stopscroll==true) return;
if(hrefs.length < 4 )return;
document.getElementById( 'roolUl ').innerHTML= " ";
&nb