跨页面请求

//list页面 <!DOCTYPE html> <html> <head>     <meta charset="utf-8">     <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">     {template "header.html", "/"}     <script src="js/base-loading.js"></script>     <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>     <script type="text/javascript" src="js/bootstrap.min.js"></script>     <link rel="stylesheet" href="css/bootstrap.min.css">     <link rel="stylesheet" type="text/css" href="css/bootstrap-grid.min.css" />     <link href="http://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">     <link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css">     <link href="css/public.css" rel="stylesheet">     <link href="css/offcanvas.min.css?v=1809181856" rel="stylesheet" type="text/css">     <link rel="stylesheet" type="text/css" href="css/default1.css">     <script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>     <script type="text/javascript" src="js/offcanvas.js"></script>     <link href="css/tangce.css" rel="stylesheet">     <style>        .zhezhao .pic{width: 800px;height: 1000px;margin: 0 auto;background-color: #FFFFFF;margin-top: 80px;}        .zhezhao .pic img{width: 100%;margin:0 auto;}        .zhezhao .zuo{position: absolute;top:50%;left:20%;width: 100px;}        .zhezhao .you{position: absolute;top:50%;right:20%;height: 100px;}        .zhezhao .delete{position: absolute;top:1%;right:2%;width:80px;height:80px;margin-top: 80px;}         @media only screen and (max-width:1450px) {             .zhezhao .zuo{position: absolute;top:50%;left:10%;width: 100px;}        .zhezhao .you{position: absolute;top:50%;right:10%;height: 100px;}                      }        @media only screen and (max-width:418px) {            .zhezhao .pic{width:70%;height:400px;margin: 0 auto;background-color: #FFFFFF;overflow:scroll;             overflow-x: hidden;margin-top:50%;border-radius: 10px;}            .zhezhao .pic img{width:90%;margin-left:5%;}            .zhezhao .zuo{position: absolute;top:50%;left:3%;width:40px;}            .zhezhao .you{position: absolute;top:50%;right:3%;height:40px;}            .zhezhao .delete{position: absolute;top:15%;right:10%;width:40px;height:40px;margin-top: 80px;}            .pic1{position: relative;left: -18px;}            .box>img{width: 100% !important;}        }        @media only screen and (max-width:375px) {            .zhezhao .pic{margin-top:180px;}            .zhezhao .delete{position: absolute;right:10%;width:40px;height:40px;margin-top: 70px;}        }        @media only screen and (max-width:320px) {            .zhezhao .pic{margin-top:180px;height:300px;}            .zhezhao .delete{position: absolute;right:10%;width:40px;height:40px;margin-top: 70px;}            .zhezhao .zuo{position: absolute;top:50%;left:3%;width:35px;}            .zhezhao .you{position: absolute;top:50%;right:3%;height:35px;}        }     </style> </head> <body>     <div>         <div>             <img src="images/left1.png" onclick="prev()">             <div>                                  <iframe src="" style="width:100%;height:100%;overflow:hidden;">                                     </iframe>             </div>             <img src="images/left2.png" onclick="next()">             <img src="images/delete.png">         </div>        {template "nav.html", "/"}                 <div>             <img src="images/8.jpg" class="img-responsive main-tu">             <div class="container aoliao">                 <div>                                                               {php $tangzuo = 0;}                     {list action=module module=tangzuo catid=$catid page=1 pagesize=4 order=updatatime}                                           <a href="{$t.url}" data-id="{$t.id}">                     <div class="col-md-6 col-xs-12 {if $tangzuo%2==0} left {else} right {/if}">                         <div {if $tangzuo%2==0} style="width: 93%" {else} style="width:95%" {/if}>                             <img src="{dr_thumb($t.thumb)}" {if $tangzuo%2==0}  {else} class="img pic1"  {/if} style="width: 100%">                             <div>                                 <div>                                     <h3>{$t.dabiaoti}</h3>                                     <span>{$t.xiaobiaoti}</span>                                 </div>                                 <ul>                                     <li><i class="fa fa-link"></i></li>                                 </ul>                             </div>                         </div>                         <p>{$t.title}</p>                     </div>                     </a>                                          <script>                         var currentid, previd, nextid = 0;                                                  $(document).on("click", ".aoliao .a1", function(e){                             e.preventDefault();                             currentid = $(this).data("id");                             iframe_show(currentid);                         })                                                  function iframe_show(id){                             $('iframe').attr('src','/index.php?s=tangzuo&c=show&id='+id);                         }                                                  function prev(){                             previd && iframe_show(previd);                         }                                                  function next(){                             nextid && iframe_show(nextid);                         }                     </script>                     {php $tangzuo++;}                     {/list}                                          {php $nums=ceil($total/4);}                                           {if $page > 1}                      {php $pre = $page-1;}                     {else}                     {php $pre=1;}                     {/if}                      <!--下一页-->                      <!--$nums为最大页码-->                     {if $page==$nums}                     {php $next = $nums;}                     {else}                     {php $next = $page+1;}                     {/if}                              <div>             <a style="font-size: 30px;color:#fbca61;cursor: pointer;" href="/index.php?s=tangzuo&c=category&id={$catid}&page={$pre}">上一页</a>                         {php $number = range(1,$nums);}                          {loop $number $val}                          <p><a href="/index.php?s=tangzuo&c=category&id={$catid}&page={$val}">{$val}</a></p>                          {/loop}                         <a style="font-size: 30px;color: #fbca61;cursor: pointer;" href="/index.php?s=tangzuo&c=category&id={$catid}&page={$next}">下一页</a>                                      </div>             </div>         </div>         <div>             {template "footer.html","/"}         </div>     </div>      </body> <script type="text/javascript">     //获取屏幕宽度,检测是否大于720     var screen_width = document.documentElement.clientWidth > 768 ? true : false ;     (function(){         //判断是否大于720,插入不同样式         if(screen_width){             $('.main-tu').attr("src","images/8.jpg");         }else{             $('.main-tu').attr("src","images/18.png");         }     })()     var screen_height = document.documentElement.clientHeight; </script> <script>     $('.zhezhao').hide();     $(".delete").click(function () {         $('.zhezhao').hide();     })     $(".a1").click(function () {         $('.zhezhao').show();     }) </script> <script>     window.onload = function(){     window.scroll(0,300);} </script> </html>
//show.html <!DOCTYPE html> <html> <head>     <meta charset="UTF-8">     {template "header.html", "/"}     <script src="js/base-loading.js"></script>     <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>     <script type="text/javascript" src="js/bootstrap.min.js"></script>     <link rel="stylesheet" href="css/bootstrap.min.css">     <style>         body img{             width: 100%;         }         body video{             width: 100%;         }     </style> </head> <body>      {$content}      <script>          parent.previd = '{$prev_page.id}';          parent.nextid = '{$next_page.id}';      </script> </body> </html>
有帮助(- 没帮助(-