Javascript ajax/jquery—打开简单弹出窗口的脚本
我需要的脚本,打开一个弹出窗口,如灯箱。但不是图像 它必须从html文件加载视频播放器代码,并将视频文件ID发送到此代码 html格式的播放器代码:Javascript ajax/jquery—打开简单弹出窗口的脚本,javascript,jquery,ajax,popup,window,Javascript,Jquery,Ajax,Popup,Window,我需要的脚本,打开一个弹出窗口,如灯箱。但不是图像 它必须从html文件加载视频播放器代码,并将视频文件ID发送到此代码 html格式的播放器代码: <iframe src="http://site.com/embed/video file ID" style="width: 800px; height: 450px; border: none; background-color: #000;" frameborder="0"></iframe> 所以我需要脚本打开
<iframe src="http://site.com/embed/video file ID" style="width: 800px; height: 450px; border: none; background-color: #000;" frameborder="0"></iframe>
所以我需要脚本打开上面的代码弹出窗口
谢谢 这真的很好。第一版是免费使用的
Html:
这真的很好。第一版是免费使用的
Html:
有关通过AJAX、Flash和视频示例的外部HTML内容,请参见中的查找其他内容类型部分
用法的简要示例:
// Format:
$(selector).colorbox({key:value, key:value, key:value});
// Examples:
// Image links displayed as a group
$('a.gallery').colorbox({rel:'gal'});
// Ajax
$('a#login').colorbox();
// Called directly, without assignment to an element:
$.colorbox({href:"thankyou.html"});
// Called directly with HTML
$.colorbox({html:"<h1>Welcome</h1>"});
// ColorBox can accept a function in place of a static value:
$("a.gallery").colorbox({rel: 'gal', title: function(){
var url = $(this).attr('href');
return '<a href="' + url + '" target="_blank">Open In New Window</a>';
}});
//格式:
$(选择器).colorbox({key:value,key:value,key:value});
//示例:
//显示为组的图像链接
$('a.gallery').colorbox({rel:'gal'});
//阿贾克斯
$('a#login').colorbox();
//直接调用,不分配给元素:
$.colorbox({href:“thankyou.html”});
//直接用HTML调用
$.colorbox({html:“欢迎”});
//ColorBox可以接受一个函数来代替静态值:
$(“a.gallery”).colorbox({rel:'gal',title:function(){
var url=$(this.attr('href');
返回“”;
}});
有关通过AJAX、Flash和视频示例的外部HTML内容,请参见中的查找其他内容类型部分
用法的简要示例:
// Format:
$(selector).colorbox({key:value, key:value, key:value});
// Examples:
// Image links displayed as a group
$('a.gallery').colorbox({rel:'gal'});
// Ajax
$('a#login').colorbox();
// Called directly, without assignment to an element:
$.colorbox({href:"thankyou.html"});
// Called directly with HTML
$.colorbox({html:"<h1>Welcome</h1>"});
// ColorBox can accept a function in place of a static value:
$("a.gallery").colorbox({rel: 'gal', title: function(){
var url = $(this).attr('href');
return '<a href="' + url + '" target="_blank">Open In New Window</a>';
}});
//格式:
$(选择器).colorbox({key:value,key:value,key:value});
//示例:
//显示为组的图像链接
$('a.gallery').colorbox({rel:'gal'});
//阿贾克斯
$('a#login').colorbox();
//直接调用,不分配给元素:
$.colorbox({href:“thankyou.html”});
//直接用HTML调用
$.colorbox({html:“欢迎”});
//ColorBox可以接受一个函数来代替静态值:
$(“a.gallery”).colorbox({rel:'gal',title:function(){
var url=$(this.attr('href');
返回“”;
}});
您需要脚本还是需要帮助编写脚本?您需要脚本还是需要帮助编写脚本?
// Format:
$(selector).colorbox({key:value, key:value, key:value});
// Examples:
// Image links displayed as a group
$('a.gallery').colorbox({rel:'gal'});
// Ajax
$('a#login').colorbox();
// Called directly, without assignment to an element:
$.colorbox({href:"thankyou.html"});
// Called directly with HTML
$.colorbox({html:"<h1>Welcome</h1>"});
// ColorBox can accept a function in place of a static value:
$("a.gallery").colorbox({rel: 'gal', title: function(){
var url = $(this).attr('href');
return '<a href="' + url + '" target="_blank">Open In New Window</a>';
}});