thickbox问题

发布时间:2025-12-09 22:01:14 浏览次数:4

thickbox是jQuery插件

首先它是js

js报错后就会影响正常使用

thickbox的使用过程:

  • 引入文件
    <link rel= "stylesheet"  type= "text/css"  href= "/js/thickbox3.1/thickbox.css" > <script type= "text/javascript"  src= "/js/thickbox3.1/thickbox.js" ></script>

    由于它是jquery插件,所以引入之前,必须有jQuery的引入

    <script type= "text/javascript"  src= "/js/class/jquery-1.3.2.min.js" ></script>

    jQuery版本不能太高,太高不一定是最好的,因为会有兼容性的问题出现

  • 然后是设置参数
    <a href= "/member/teacher/shownotice/id/<!--{$info[data].id}-->?KeepThis=true&TB_iframe=true&TB_iniframe=true&TB_reload=true&Parent_reload=true&height=640&width=1200"  class = "thickbox"  title= "查看通知" >

    关键代码?KeepThis=true&TB_iframe=true&TB_iniframe=true&TB_reload=true&Parent_reload=true&height=640&width=1200" class="thickbox" title="查看通知"

  • 之后是调试效果
  • 你会看到悬浮的效果这就对了
  • 遇到的问题:

    样式不正确了,后来发现是jQuery版本过高导致的

     

    解决:

    把jQuery版本换低一点,就好用了

    注:这里的文件引入,主页面也需要引入,也就是iframe所在页面也需要,至于为什么,我也不知道。

    本文转自TBHacker博客园博客,原文链接:http://www.cnblogs.com/jiqing9006/archive/2013/03/04/2942561.html,如需转载请自行联系原作者

    需要做网站?需要网络推广?欢迎咨询客户经理 13272073477