iframe to stackoverflow.com in jsbin
iframe to stackoverflow.com in jsbin
我正在使用jsbin来测试一些与iframe相关的代码,这是我工作的链接http://www.jsbin.com/evidez/1/edit
我错误地将 iframe 的 url 设置为 http://stackoverflow.com,现在当 http://www.jsbin.com/evidez/1/edit 加载时,会弹出警报,并在关闭它时重定向到 http://stackoverflow.com。
我找不到任何方法来编辑我的 jsbin 代码。
有没有出路,还是我必须重新开始?
我用浏览器摔跤,为你抢救了这个。下次要小心。
.HTML
<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<title>Full Screen Example</title>
</head>
<body>
<button id="fullsc">set source to iframe and take me full screen</button><br><br>
<iframe id="myvideo" src="http://stackoverflow.com"></iframe>
</body>
</html>
.CSS
/* make the video stretch to fill the screen in WebKit */
:-webkit-full-screen #myvideo {
width: 100%;
height: 100%;}
iframe{
position: absolute;
height: 100%;
width:100%
}
爪哇语
var videoElement = $('#myvideo');
var fullsc = $('#fullsc');
function toggleFullScreen() {
if (!document.mozFullScreen && !document.webkitFullScreen) {
if (videoElement.mozRequestFullScreen) {
videoElement.mozRequestFullScreen();
} else {
videoElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
}
} else {
if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else {
document.webkitCancelFullScreen();
}
}
}
document.addEventListener("keydown", function(e) {
if (e.keyCode == 13) {
toggleFullScreen();
}
}, false);
fullsc.onclick = function(){
//setiframeurl();
toggleFullScreen();
};
function setiframeurl(){
$('#myvideo').attr('src', "http://radbox.me/watch/mobile?c=21&du=35");
}
相关文章:
- Node.js's Buffer.writeFloatBE in Javascript
- Setting default onclick behavior for <img> tag in gene
- Lucene Search in Alfresco
- grep in JQuery to C#
- write HTML in JavaScript
- jQuery setTimeOut: in for-loop
- SetTimeout and clearTimeout in Javascript
- lightbox in html 5 and javascript
- 如何在您的计算机上运行JSBin代码
- HTMLInputElement in IE7
- Mongodb$in以与数组中相同的顺序获取结果
- element.dataset in Internet Explorer
- jQuery parent() in table
- Instagram oauth flow in angularjs
- JS代码在jsbin中有效,在jsfiddle或Chrome/Safari中无效
- In循环的In运算符前后
- 如何使用for in循环在javascript中显示对象中的对象
- Jquery change onchange in onload
- 重构 jQuery in JS 问题
- iframe to stackoverflow.com in jsbin