<script type="text/javascript">
        $().ready(function () {
            $(function () {
                $("#tabUl li:first").addClass("active");
                $("#tabUlb div:gt(0)").hide();
                $("#tabUl li").click(function () {
                    $(this).addClass("active").siblings("li").removeClass();
                    $(".tab div.tab_content:eq(" + $(this).index() + ")").show().siblings("div").hide();
                });
            });
        });  
    </script>

 

<style>

 .tab #tabUl, li { margin:0px; padding:0px; list-style:none; text-align:left;}    
 .tab #tabUl li { display: inline-block; zoom: 1; *display: inline;  color:#444; text-align:center; padding:1px 10px; cursor:pointer;border-bottom:solid 3px #eee;}    
 .tab  #tabUl .active{ color:Red; border-bottom:solid 3px red;text-align:center; padding:1px 10px; cursor:pointer;}   
 .tab_content { text-align:left; padding-top:20px; }
 

</style>

 <ul >
       
<li>产品简介</li>

<li>规格参数</li>

<li>套装详情</li>

<li>操作指南</li>

</ul>

<div class="tab_content"></div>

<div class="tab_content"></div>

<div class="tab_content"></div>

<div class="tab_content"></div>

</div>

 

  <iframe src="" ></iframe>

 

<script type="text/javascript">
    function autoHeight() {
        var iframe = document.getElementById("Iframe");
        if (iframe.Document) {//ie自有属性
            iframe.style.height = iframe.Document.documentElement.scrollHeight;
        } else if (iframe.contentDocument) {//ie,firefox,chrome,opera,safari
            iframe.height = iframe.contentDocument.body.offsetHeight;
        }
    }
</script>

 

 $(function () {

        $("#Iframe").attr("src", "/products/X11.htm");

                  autoHeight();

        });
    })

 

相关文章:

  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2022-12-23
  • 2021-07-07
  • 2021-12-23
  • 2021-09-14
猜你喜欢
  • 2021-06-06
  • 2022-12-23
  • 2021-06-11
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案