无限在iframe框架内打开我发整体跳转怎么解决?

图片说明图片说明图片说明

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>无标题文档</title>
  <style type="text/css">
    body{  background-color:#000;
      text-align:center;
    }

    p{
      font-size:24px;
      color:#F4F889;

    }


    /*** 菜单 ***/
    .xuanfu  li{
      list-style:none;
    }
    .xuanfu ul a{
      text-decoration:none;
      color:#666;
    }
    .xuanfu{
      position:fixed;
      top:0px;
      right:0px;
      height:100%;
      width:6px;
      background-color:#7a6e6e;
      text-align:right;
    }
    .xuanfu ul{
      position:absolute;
      top:40%;
      right:0;
      transform:translate(0,-40%);
      z-index:3;
    }
    .xuanfu ul li{
      width:34px;
      margin-bottom:30px;
      font-size:15px;
      background-color:#7a6e6e;
      vertical-align:middle;
      text-align:center;
      position:relative;
      display:block;
      float:right;
    }
    .xuanfu ul .nb1 .xuanfu-ico{
      display:block;
      width:34px;
      color:#fff;
      padding-top:10px;
      padding-bottom:10px;
      background-color:red;
    }
    .xuanfu ul .xuanfu-ico{
      display:block;
      width:34px;
      color:fff;
      padding-top:10px;
      padding-bottom:10px;
      background-color:blue;
    }

    #content{width:20px;height:20px;text-align:center;font-size:16px;color:red;postion:absolute;right:0px;top:0px;coursor:pointer;}
    .main_left{
    width:100px;
    height:515px;
    float:left;
    background-color:transparent;
    cursor:pointer;
}
  </style>
  <script type="text/javascript">
  $(function(){
   $(".main_left li").on("click",function(){
         var address =$(this).attr("data-src");
      $("iframe").attr("src",address);
   });
});
</script>
</head>
<body >
<!-- 左侧内容 -->
<div class="main_left" >

    <iframe frameborder="0" scrolling="yes" allowtransparency=”true” style="width:120px;height:100%;" src="../../web/左侧菜单/index.html" name="aa" sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts"></iframe>
    </div>


<p>见或不见</p>

<p>你见<br>
  或者不见我<br>
  我就在那里<br>
  不悲不喜</p>
<p>你念<br>
  或者不念我<br>
  情就在那里<br>
  不来不去</p>
<p>你爱<br>
  或者不爱我<br>
  爱就在那里<br>
  不增不减 </p>



<!--布局开始微机18-2张帅龙-->

    <!--返回菜单-->




    <div class="xuanfu">
      <ul>
        <li class="nb1" style="display:{$kdaddress ? 'block': 'none'}">
          <i></i>
          <a class="xuanfu-ico" href="../../index.html">首<br>页</a>
        </li>
        <li class="nb2" style="display:{$kdaddress ? 'block': 'none'}">
          <i></i>
          <a class="xuanfu-ico" href="../../index.html">上<br>一<br>页</a>
        </li>
        <li class="nb1" style="display:{$kdaddress ? 'block': 'none'}">
          <i></i>
          <a class="xuanfu-ico" href="2.html">下<br>一<br>页</a>
        </li>
        <li class="nb2" style="display:{$kdaddress ? 'block': 'none'}">
          <i></i>
          <a class="xuanfu-ico" href="../Chapter 12/index.html">尾<br>页</a>
        </li>
      </ul>
</div>
    <!--飘动ppt-->
    <div id="main" style="position:absolute;">
      <div style="text-align:right;cursor:pointer;" id="close"><img src="img/guanbi.jpg" width="15" height="15"></div>
      <a href='../../web/下载界面/1下载-第一章.html'" target="_blank"><img src="img/PowerPoint1.png" border="0" width="150" height="50" /></a>
    </div>
</body>
</html>
<!--//ppt漂浮/js-->
<script src="../../js/飘动ppt的js.js"></script>
<script>
  <!--//公共脚本文件 main.js
  function addEvent(obj, evtType, func, cap) {
    cap = cap || false;
    if (obj.addEventListener) {
      obj.addEventListener(evtType, func, cap);
      return true;
    } else if (obj.attachEvent) {
      if (cap) {
        obj.setCapture();
        return true;
      } else {
        return obj.attachEvent("on" + evtType, func);
      }
    } else {
      return false;
    }
  }
  function removeEvent(obj, evtType, func, cap) {
    cap = cap || false;
    if (obj.removeEventListener) {
      obj.removeEventListener(evtType, func, cap);
      return true;
    } else if (obj.detachEvent) {
      if (cap) {
        obj.releaseCapture();
        return true;
      } else {
        return obj.detachEvent("on" + evtType, func);
      }
    } else {
      return false;
    }
  }
  function getPageScroll() {
    var xScroll, yScroll;
    if (self.pageXOffset) {
      xScroll = self.pageXOffset;
    } else if (document.documentElement && document.documentElement.scrollLeft) {
      xScroll = document.documentElement.scrollLeft;
    } else if (document.body) {
      xScroll = document.body.scrollLeft;
    }
    if (self.pageYOffset) {
      yScroll = self.pageYOffset;
    } else if (document.documentElement && document.documentElement.scrollTop) {
      yScroll = document.documentElement.scrollTop;
    } else if (document.body) {
      yScroll = document.body.scrollTop;
    }
    arrayPageScroll = new Array(xScroll, yScroll);
    return arrayPageScroll;
  }
  function GetPageSize() {
    var xScroll, yScroll;
    if (window.innerHeight && window.scrollMaxY) {
      xScroll = document.body.scrollWidth;
      yScroll = window.innerHeight + window.scrollMaxY;
    } else if (document.body.scrollHeight > document.body.offsetHeight) {
      xScroll = document.body.scrollWidth;
      yScroll = document.body.scrollHeight;
    } else {
      xScroll = document.body.offsetWidth;
      yScroll = document.body.offsetHeight;
    }
    var windowWidth, windowHeight;
    if (self.innerHeight) {
      windowWidth = self.innerWidth;
      windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
      windowWidth = document.documentElement.clientWidth;
      windowHeight = document.documentElement.clientHeight;
    } else if (document.body) {
      windowWidth = document.body.clientWidth;
      windowHeight = document.body.clientHeight;
    }
    if (yScroll < windowHeight) {
      pageHeight = windowHeight;
    } else {
      pageHeight = yScroll;
    }
    if (xScroll < windowWidth) {
      pageWidth = windowWidth;
    } else {
      pageWidth = xScroll;
    }
    arrayPageSize = new Array(pageWidth, pageHeight, windowWidth, windowHeight)
    return arrayPageSize;
  }

  var AdMoveConfig = new Object();
  AdMoveConfig.IsInitialized = false;
  AdMoveConfig.AdCount = 0;
  AdMoveConfig.ScrollX = 0;
  AdMoveConfig.ScrollY = 0;
  AdMoveConfig.MoveWidth = 0;
  AdMoveConfig.MoveHeight = 0;
  AdMoveConfig.Resize = function () {
    var winsize = GetPageSize();
    AdMoveConfig.MoveWidth = winsize[2];
    AdMoveConfig.MoveHeight = winsize[3];
    AdMoveConfig.Scroll();
  }
  AdMoveConfig.Scroll = function () {
    var winscroll = getPageScroll();
    AdMoveConfig.ScrollX = winscroll[0];
    AdMoveConfig.ScrollY = winscroll[1];
  }
  addEvent(window, "resize", AdMoveConfig.Resize);
  addEvent(window, "scroll", AdMoveConfig.Scroll);
  function AdMove(id, addCloseButton) {
    if (!AdMoveConfig.IsInitialized) {
      AdMoveConfig.Resize();
      AdMoveConfig.IsInitialized = true;
    }
    AdMoveConfig.AdCount++;
    var obj = document.getElementById(id);
    obj.style.position = "absolute";
    var W = AdMoveConfig.MoveWidth - obj.offsetWidth;
    var H = AdMoveConfig.MoveHeight - obj.offsetHeight;
    var x = W * Math.random(), y = H * Math.random();
    var rad = (Math.random() + 1) * Math.PI / 6;
    var kx = Math.sin(rad), ky = Math.cos(rad);
    var dirx = (Math.random() < 0.5 ? 1 : -1), diry = (Math.random() < 0.5 ? 1 : -1);
    var step = 1;
    var interval;
    if (addCloseButton) {
      var closebtn = document.createElement("div");
      obj.appendChild(closebtn);

      closebtn.onclick = function () {
        obj.style.display = "none";
        clearInterval(interval);
        closebtn.onclick = null;
        obj.onmouseover = null;
        obj.onmouseout = null;
        obj.MoveHandler = null;
        AdMoveConfig.AdCount--;
        if (AdMoveConfig.AdCount <= 0) {
          removeEvent(window, "resize", AdMoveConfig.Resize);
          removeEvent(window, "scroll", AdMoveConfig.Scroll);
          AdMoveConfig.Resize = null;
          AdMoveConfig.Scroll = null;
          AdMoveConfig = null;
        }
      }
    }
    obj.MoveHandler = function () {
      obj.style.left = (x + AdMoveConfig.ScrollX) + "px";
      obj.style.top = (y + AdMoveConfig.ScrollY) + "px";
      rad = (Math.random() + 1) * Math.PI / 6;
      W = AdMoveConfig.MoveWidth - obj.offsetWidth;
      H = AdMoveConfig.MoveHeight - obj.offsetHeight;
      x = x + step * kx * dirx;
      if (x < 0) { dirx = 1; x = 0; kx = Math.sin(rad); ky = Math.cos(rad); }
      if (x > W) { dirx = -1; x = W; kx = Math.sin(rad); ky = Math.cos(rad); }
      y = y + step * ky * diry;
      if (y < 0) { diry = 1; y = 0; kx = Math.sin(rad); ky = Math.cos(rad); }
      if (y > H) { diry = -1; y = H; kx = Math.sin(rad); ky = Math.cos(rad); }
    }
    this.SetLocation = function (vx, vy) { x = vx; y = vy; }
    this.SetDirection = function (vx, vy) { dirx = vx; diry = vy; }
    this.Run = function () {
      var delay = 10;
      interval = setInterval(obj.MoveHandler, delay);
      obj.onmouseover = function () { clearInterval(interval); }
      obj.onmouseout = function () { interval = setInterval(obj.MoveHandler, delay); }
    }
  }
  //-->
</script>
<script type="text/javascript">
  $(function() {
    $("#close").click(function() {
      $("#main").hide();
    });
  })
  var ad1 = new AdMove("main", true);
  ad1.Run();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>左侧菜单</title>
</head>

<style type="text/css">
.ok {
    font-family:'幼圆';
  backface-visibility:hidden;
  background:transparent;
}
input[id*="joacims-menu"] {
  display:none;
}

input[id*="joacims-menu"] + label {
  display:block;
  width:35px;
  height:35px;
  background:#222;
  cursor:pointer;
  font-size:30px;
  color:#fff;
  position:relative;
}

input[id*="joacims-menu"] + label span {
  display:block;
  position:absolute;
  left:8px;
  transition:.2s;
}

input[id*="joacims-menu"]:checked + label span {
  transform:rotate(45deg);
  font-size:34px;
  top:-2px;
  left:9px;
}

nav li {
  display:block;
  height:40px;
  line-height:40px;
  background:#CCC;

  width:100px;
  padding-left:10px;
  text-decoration:none;
  color:white;
  box-shadow:5px 0 0 #000;
}

input[id*="joacims-menu"] ~ nav li.first:nth-child(1) { box-shadow:5px 0 0 #3498db; transition-delay:.05s; }
input[id*="joacims-menu"] ~ nav li.first:nth-child(2) { box-shadow:5px 0 0 #2ecc71; transition-delay:.10s; }
input[id*="joacims-menu"] ~ nav li.first:nth-child(3) { box-shadow:5px 0 0 #e67e22; transition-delay:.15s; }
input[id*="joacims-menu"] ~ nav li.first:nth-child(4) { box-shadow:5px 0 0 #c0392b; transition-delay:.20s; }
input[id*="joacims-menu"] ~ nav li.first:nth-child(5) { box-shadow:5px 0 0 #2c3e50; transition-delay:.25s; }
input[id*="joacims-menu"] ~ nav li.first:nth-child(6) { box-shadow:5px 0 0 #f1c40f; transition-delay:.30s; }
input[id*="joacims-menu"] ~ nav li.first:nth-child(7) { box-shadow:5px 0 0 #30F; transition-delay:.35s; }
input[id*="joacims-menu"] ~ nav li.first:nth-child(8) { box-shadow:5px 0 0 #F0F; transition-delay:.40s; }
input[id*="joacims-menu"] ~ nav li.first:nth-child(9) { box-shadow:5px 0 0 #F00; transition-delay:.45s; }
input[id*="joacims-menu"] ~ nav li.first:nth-child(10) { box-shadow:5px 0 0 #3CF; transition-delay:.50s; }
input[id*="joacims-menu"] ~ nav li.first:nth-child(11) { box-shadow:5px 0 0 #F66; transition-delay:.55s; }
input[id*="joacims-menu"] ~ nav li.first:nth-child(12) { box-shadow:5px 0 0 #639; transition-delay:.60s; }


input[id*="joacims-menu"]:checked ~ nav li.first {
  margin-left:0px;
}

input[id*="joacims-menu"]:checked ~ nav li.first:hover {
  width:110px;
}

input[id*="joacims-menu"] ~ nav li.first {
  margin-left:-110px;
  transition:.6s margin;
}

input[id*="joacims-menu"] ~ nav li.first:hover {
  background:#999;
}
*{padding: 0;margin: 0;}
 ul,li{list-style: none;}
    ul >li{
        list-style: none;
        position: relative;
    }
    ul>li>ul{
        margin: 0px auto;
    }
    ul >li>a {
        text-decoration: none;
    }
    .tu{
        display: none;
    }
.first a {
    color: #000;
    font-family: HelveticaNeue-UltraLight, "幼圆", Roboto, Arial, Sans-serif;
    text-decoration-line: none;
}

</style>
<script>
    window.onload= function () {
      var AllMenuLi=document.getElementsByClassName('first');
       var i=0;
        for(i=0;i<AllMenuLi.length;i++)
        {
            AllMenuLi[i].onclick= function () {
              //  alert("sss");
               var UlMenuLi=this.getElementsByTagName("ul")[0];
                if(UlMenuLi.className=='tu')
                {
                 UlMenuLi.className='';
                }
                else {
                    UlMenuLi.className='tu';
                }
            };
        }
    };
</script>
<body background="transparent">

<nav class="ok"> 

<input type="checkbox" id="joacims-menu" checked/>

<label for="joacims-menu"><span>+</span></label>

<nav>
    <li class="first">
    <a href="../../images/Chapter I/1.html" target="aa">第一章</a>
</li>
    <li class="first">
    <a href="../../images/Chapter II/1.html" target="aa">第二章</a>
</li>
    <li class="first">
    <a href="../../images/Chapter III/1.html" target="aa">第三章</a>
</li>
    <li class="first">
    <a href="../../images/Chapter IV/1/index.html">第四章</a>
</li>
    <li class="first">
    <a href="../../images/Chapter V/1.html">第五章</a>
</li>
    <li class="first">
<a href="../../images/Chapter VI/1.html">第六章</a>
</li>
    <li class="first">
    <a href="../../images/Chapter VII/1.html">第七章</a>
</li>
    <li class="first">
    <a href="../../images/Chapter VIII/1.html">第八章</a>
</li>
    <li class="first">
    <a href="../../images/Chapter 9/1.html">第九章</a>
</li>
    <li class="first">
    <a href="../../images/Chapter 10/1.html">第十章</a>
</li>
    <li class="first">
    <a href="../../images/Chapter 11/1.html">第十一章</a>
</li>
    <li class="first">
    <a href="../../images/Chapter 12/index.html">第十二章</a>
</li>
    </nav>
</nav>

</body>
</html>

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐