当前位置:首页 >> 网络编程

greybox——不开新窗口看新的网页

demo:http://www.healdream.com/upload/html/jquery/greybox/test.html
down:http://www.51files.com/?9UF4NA8RCRX5A0Z2F170
使用方法
复制代码 代码如下:
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery.js">    <script type="text/javascript" src="/UploadFiles/2021-04-02/greybox.js">    <link href="greybox.css" rel="stylesheet" type="text/css" media="all" />
    <script type="text/javascript">
      var GB_ANIMATION = true;
      $(document).ready(function(){
        $("a.greybox").click(function(){
          var t = this.title || $(this).text() || this.href;
          GB_show(t,this.href,450,600);
          return false;
        });
      });
    </script>

满简单的,将两个js包含进来,然后链接css,最后对所有class为greybox的链接响应click事件,就KO了