fuc/public/assets/baba/test/iframe.html
2025-02-23 13:30:57 +08:00

42 lines
1002 B
HTML
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>iframe - test</title>
<style>
body {
margin: 0;
}
#doc {
height: 560px;
}
#doc iframe {
display: block;
width: 550px;
border: 1px solid #CCC;
height: 450px;
margin: 100px auto 0 auto;
}
</style>
</head>
<body>
<script>
!/http/.test(location.protocol) && document.write('<h1>请在服务端预览Chrome 浏览器本地访问 iframe 会跨域无权限)</h1>');
</script>
<div id="doc">
<iframe id="test-iframe" src="about:blank" data-src="show-element.html"></iframe>
</div>
<script src="../lib/jquery-1.10.2.js"></script>
<script src="../dist/dialog.js"></script>
<script>
window.dialog = dialog;
var $iframe = $('#test-iframe');
$iframe.attr('src', $iframe.data('src'));
</script>
</body>
</html>