产品使用及交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

选项卡的问题 [复制链接]

1#

www.zghnqyw.org

<script language=javascript>
var Showed_TabId;
function Hide_Template(Ids)
{
   var AIds=Ids.split(',');
   for(i=0;i<AIds.length;i++)
    {
       document.getElementById("Template_"+AIds).style.display="none";
    }
}

function Load_Template_Content(FromId,ToId)
{
   document.getElementById("Template_Content_"+ToId).innerHTML=document.getElementById("Template_Content_"+FromId).innerHTML;
   Showed_TabId=FromId;
}

自定义样式
function ShowTab(Id,ToId)
{
   document.getElementById("Tab_"+Showed_TabId).className="template_tab_title_1";
   document.getElementById("Tab_"+Id).className="template_tab_title";
  
   Load_Template_Content(Id,ToId);
}

</script>
  <style type="text/css">
.template_tab_title{float:left;text-align:center;width:100px;height:21px;padding-top:5px;background:red no-repeat left bottom;font-weight:bold;colorffffff;cursor:pointer}
  .template_tab_title_1{float:left;text-align:center;width:100px;height:21px;padding-

top:5px;backgroundreen no-repeat left bottom;cursor:pointer}
  .template_tab_title_right{float:right;padding-top:5px;}
</style>
<ul style="width: 100%">
    <li class="template_tab_title" id="Tab_114" onmouseover="ShowTab('114','113');">校园新闻</li>
    <li class="template_tab_title_1" id="Tab_115" style="margin-left: 5px" onmouseover="ShowTab('115','113');">百度</li>
    <li class="template_tab_title_1" id="Tab_116" style="margin-left: 5px" onmouseover="ShowTab('116','113');">谷歌</li>
    <li class="template_tab_title_1" id="Tab_117" style="margin-left: 5px" onmouseover="ShowTab('117','113');">狗狗</li>
    <li class="template_tab_title_right"><a href="#">更多...</a>&nbsp;</li>
</ul>



内容设置
<script type="text/javascript">
Hide_Template("114,115,116,117");
Load_Template_Content("115","113");
</script>

114 115 116 117 为模块编号
113为自定义选项卡编号
分享 转发
TOP
2#

是我搞错了 他这个产品的模板在usercontrol中的productinfo文件 你可以改里面的代码设置为隐藏 然后就像你说的搞个选项卡什么的 这个因为现在太忙我没试过  你看看不行了再说 你可以用reflector直接看他封装的代码 然后调用函数
TOP
发新话题 回复该主题