zoukankan      html  css  js  c++  java
  • 锚点、target="page1"、浮标回到顶部(该点未实现,能力不足)

     <html>
    <head>
      <meta charset="utf-8">
      <title>链接</title>
    <!--
    HTML页面
    <div id="gotop"></div>
    -->  
    <!--CSS样式-->  
    <style type="css/text">
        #gotop{position:fixed;right:10px;bottom:10px;display:none}
    </style>
    <!--JavaScript脚本-->
    <script type="javascript/text">
        $(function(){
            $(window).scroll(function(){
                if($(window).scrollTop > 100){
                    $("#gotop").fadeIn(1000);//一秒渐入动画
                }else{
                    $("#gotop").fadeOut(1000);//一秒渐隐动画
                }
            });
             
            $("#gotop").click(function(){
                $('body,html').animate({scrollTop:0},1000);
            });
        });
    </script>
    
    </head>
    
    <body>
    <h1>target在目标地点打开网页</h1>
    <a href="http://www.baidu.com" target="page1">在IFRAME中打开百度首页</a>
    <a href="../character.htm" target="page1">在IFRAME中打开字符实体示例</a>
    <iframe style=" 600px; height: 300px; border: 1px solid #666;" name="page1">
    </iframe>
    
    <h1>锚点</h1>
    <table width="600px" height="20px" border="1" cellspacing="0" cellpadding="5px">
    <tr>
        <td><a href="#top">top</a></td>
        <td><a href="#center">center</a></td>
        <td><a href="#buttom">buttom</a></td>
    </tr>
    </table>
    
    <a name="top">top</a>
    <table width="600px" height="300px">
    <tr><td>111</td></tr>
    </table>
     
    <a name="center">center</a>
     
    <table width="600px" height="300px">
    <tr><td>111</td></tr>
    </table>
    
    <a name="buttom">buttom</a>
    </body>
    </html>
  • 相关阅读:
    会话:Cookie、Session
    Response:HTTP响应、重定向、验证码、ServletContext对象
    javabean 深拷贝
    条形码生成工具类
    java zxing 生成条形码和二维吗
    强大的httpClientUtils
    Java处理图片工具类
    生成二维码
    过滤掉map集合中key或value为空的值
    将异常堆栈信息转换成字符串
  • 原文地址:https://www.cnblogs.com/1020182600HENG/p/6057170.html
Copyright © 2011-2022 走看看