1
我需要在不同域上嵌入iframe,当点击打开使用花哨框的模式框时。将网站嵌入到不同域上的模式框中
它会这样工作。一旦点击加载保存的iframe
我需要这样做,因为的fancybox需要占用大部分屏幕960x700
我如何将一个模式对话框(的fancybox)
用户点击图像 做这个?
我需要在不同域上嵌入iframe,当点击打开使用花哨框的模式框时。将网站嵌入到不同域上的模式框中
它会这样工作。一旦点击加载保存的iframe
我需要这样做,因为的fancybox需要占用大部分屏幕960x700
我如何将一个模式对话框(的fancybox)
用户点击图像 做这个?
这样的事情应该这样做。查看他们的API了解更多关于如何使用它的细节
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript" src="http://fancybox.net/js/fancybox/jquery.fancybox-1.3.1.pack.js"></script>
<link rel="stylesheet" type="text/css" href="http://fancybox.net/js/fancybox/jquery.fancybox-1.3.1.css" media="screen" />
<script>
$(document).ready(function() {
/* This is basic - uses default settings */
$("a.iframe").fancybox({
'transitionIn' : 'elastic', //Used for animation, delete if not needed
'transitionOut' : 'elastic', //Used for animation, delete if not needed
'speedIn' : 600, //Used for animation, delete if not needed
'speedOut' : 200, //Used for animation, delete if not needed
'overlayShow' : false, //Used for animation, delete if not needed
'width' : 650, //Set your width
'height' : 500 //Set your height
});
});
</script>
</head>
<body>
<a class="iframe" href="http://www.google.com">Click to open fancy box</a>
</body>
</html>
感谢brandon工作!我需要结合所有的js,所以我只连接一个文件,然后准备好去! – 2010-08-03 10:58:36
太棒了!很高兴我能够提供帮助。 – 2010-08-03 11:38:24