页面地址:http://www.zmpos.com:8001/ ,页面左上角是一个层隐藏效果,在IE7下 通用系列软件 辉煌系列软件 休闲娱乐类 管理工具 等文字会闪动,然后字就不见了,其他浏览器下效果正常
解决方案 »
- 求教,EXTJS和IE6、7、8的相性
- 分享代码:简单的创建JavaScript闭包的示例
- 叫做个根据jquery组件名,动态导入所需js和css文件的东西,请教些问题
- 浏览器端如何获得在Frame中打开的Excel对象, 以便在浏览器操纵Excel ???
- 急需javascript 树,并且要有checkbox可以选择的?
- JAVASCRIPT怎么作页面提交
- 在线100分求正则表达式!
- javascript调用本地文件!把此.htm保存为本地文件可以,但通过webserver却不行?!!
- 请帮我看看这段js脚本是什么意思???
- ajaxFileUpload上传文件问题
- 谁有深入浅出Ext JS(第2版) 完整版PDF
- parseInt(RegExp.$1) + 1)+""="NaN"
层隐藏代码
function ToggleShow(t) {
var _this = t;
var aTabs = GetElementChildren( GetElement('tabgroups') );
var aContents = GetElementChildren( GetElement('contentgroups') );
var index = GetIndex(GetElement(_this), aTabs);
for (i in aTabs) {
RemoveClassName(GetElement(aTabs[i]), 'TabbedPanelsTabSelected');
}
for (i in aContents) {
RemoveClassName(GetElement(aContents[i]), 'TabbedPanelsContentSelected');
}
AddClassName(GetElement(_this), 'TabbedPanelsTabSelected');
AddClassName(aContents[index], 'TabbedPanelsContentSelected');
}
<div style="float:left;">
<div class="TabbedPanelsTabGroup" >
<ul id="tabgroups" >
<%
i=0
pro_sql="select top 4 m_id, m_name from zm_menu where m_parentID="&SysTJProduct&" order by m_id asc"
rs.open pro_sql,conn,1,1
if not rs.eof then
do while not rs.eof
i=i+1
%>
<li onclick="ToggleShow(this)" <% if i=1 then %> class="TabbedPanelsTabSelected" <% end if %> ><%=rs("m_name")%></li>
<%
rs.movenext
loop
end if
rs.close
%>
</ul>
</div>
<div id="contentgroups" class="TabbedPanelsContentGroup">
<%
j=0
content_sql="select p_content from zm_page where p_menuID in (select top 4 m_id from zm_menu where m_parentID="&SysTJProduct& "order by m_id asc)"
rs.open content_sql ,conn,1,1
if not rs.eof then
do while not rs.eof
j=j+1
%>
<div <% if j=1 then %> class="TabbedPanelsContent TabbedPanelsContentSelected" <% else %> class="TabbedPanelsContent" <% end if %>>
<%=rs("p_content")%> </div>
<%
rs.movenext
loop
end if
rs.close
%>
</div>
width:22px;
}
margin: 0px;
padding: 0px;
float: left;
clear: none;
width: 200px; /* IE Hack to force proper layout when preceded by a paragraph. (hasLayout Bug)*/
}
.TabbedPanelsTabGroup {
margin: 0px;
padding: 0px;
}
.TabbedPanelsTabGroup ul {
margin: 0px;
padding: 0px;
list-style: none;
}
.TabbedPanelsTabGroup ul li {
position: relative;
top: 1px;
float: left;
padding: 0 10px;
margin: 0px 1px 0px 0px;
/*background-color: #eee;*/
list-style: none;
border: solid 1px;
-moz-user-select: none;
-khtml-user-select: none;
cursor: pointer;
height: 20px;
line-height: 20px;
font-size: 9pt;
/*color: #666; */
color:#1899a7;
overflow:hidden;
}
.TabbedPanelsTabGroup .TabbedPanelsTabSelected {
/*background-color: #333;*/
border: 1px solid #333;
/*color: #fff;*/
/*color: #1899a7*/
}.TabbedPanelsContentGroup {
clear: both;
border: solid 1px #999;
background-color: #fff;
width:341px;
height:166px;
overflow:hidden;
}
.TabbedPanelsContent {
padding: 1px;
display: none;
}
.TabbedPanelsContentSelected {
display: block;
}另外页面上 http://www.zmpos.com:8001/ 新闻中心 滚动的效果 JS如下// JavaScript Document
/*
$(function(){
$("#newslist").Scroll({line:1,speed:500,timer:1000});
});
*/(function($){
$.fn.extend({
Scroll:function(opt,callback){
//参数初始化
if(!opt) var opt={};
var _btnUp = $("#"+ opt.up);//Shawphy:向上按钮
var _btnDown = $("#"+ opt.down);//Shawphy:向下按钮
var timerID;
var _this = this.eq(0).find("ul:first");
var lineH = _this.find("li:first").height(), //获取行高
line = opt.line?parseInt(opt.line,10):parseInt(this.height()/lineH,10), //每次滚动的行数,默认为一屏,即父容器高度
speed = opt.speed?parseInt(opt.speed,10):500; //卷动速度,数值越大,速度越慢(毫秒)
timer = opt.timer //?parseInt(opt.timer,10):3000; //滚动的时间间隔(毫秒)
if(line==0) line=1;
var upHeight=0-line*lineH;
//滚动函数
var scrollUp=function(){
_this.animate({
marginTop:upHeight
},speed,function(){
for(i=1;i<=line;i++){
_this.find("li:first").appendTo(_this);
}
_this.css({marginTop:0}); });
}
timerID = window.setInterval(scrollUp,timer);
//Shawphy:向下翻页函数
var scrollDown=function(){
_btnDown.unbind("click",scrollDown);
for(i=1;i<=line;i++){
_this.find("li:last").show().prependTo(_this);
}
_this.css({marginTop:upHeight});
_this.animate({
marginTop:0
},speed,function(){
_btnDown.bind("click",scrollDown);
});
}
//Shawphy:自动播放
var autoPlay = function(){
if(timer) timerID = window.setInterval(scrollUp,timer);
};
var autoStop = function(){
if(timer)window.clearInterval(timerID);
};
//鼠标事件绑定
_this.hover(autoStop,autoPlay).mouseout();
_btnUp.css("cursor","pointer").click( scrollUp ).hover(autoStop,autoPlay);//Shawphy:向上向下鼠标事件绑定
_btnDown.css("cursor","pointer").click( scrollDown ).hover(autoStop,autoPlay); }
})
})(jQuery);
当我把 _this.css({marginTop:0}); 注释 ,IE7下就正常了