第一种点击链接弹出

前提是引用jquery、colorbox的js、colorbox的css

html

<a id="baidu" href="http://www.baidu.com" >baidu</a>

js

  $("#baidu").colorbox({ innerWidth: 610, innerHeight: 580, iframe:true});

 

第二种onclick:

$.colorbox({ innerWidth: 610, innerHeight: 580, iframe:true,href:'http://www.baidu.com'});

第三种 onclick执行后台方法之后再弹出生成的页面那么只能 使用ajax

相关文章:

  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
猜你喜欢
  • 2021-10-29
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2022-01-17
相关资源
相似解决方案