You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
2.2 KiB
70 lines
2.2 KiB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
|
<head>
|
|
<title>高拍仪</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf8" />
|
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
|
<script type="text/javascript" src="../Common/commondefine.js"></script>
|
|
<script type="text/javascript" src="../Common/jquery.js"></script>
|
|
<script type="text/javascript" src="jquery.rotate.js"></script>
|
|
<script type="text/javascript" src="function.js"></script>
|
|
|
|
|
|
</head>
|
|
|
|
<body style="background-color: #FFF;" onLoad="Init()", onbeforeunload="Release()">
|
|
<input class="function_button" type="button" onclick="returnImageBase()" value="郑渤旭" />
|
|
<div id="gpy_result_base64">lalalalallala</div>
|
|
<script>
|
|
window.addEventListener('message', function(event) {
|
|
if (event.origin !== "http://192.168.0.146") return;
|
|
// 处理消息
|
|
console.log(event.data);
|
|
});
|
|
|
|
// // 监听来自父页面的消息
|
|
// window.addEventListener('message', function(event) {
|
|
// if (event.origin === 'http://192.168.0.146:9527') { // 确保消息来源可信
|
|
// console.log('Received message:', event.data);
|
|
|
|
// // 向父页面发送回复
|
|
// event.source.postMessage({ message: 'Hello, I am the iframe' }, event.origin);
|
|
// }
|
|
// });
|
|
|
|
// var ttt=document.getElementById("gpy_result_base64").innerHTML;
|
|
// window.parent.postMessage({
|
|
// cmd:'myIframe',
|
|
// params: {
|
|
// info: ttt,
|
|
// }
|
|
// }, '*'); // * 任何地址都可以,可以指定地址
|
|
// function addCrossDomainScript(url) {
|
|
// var script = document.createElement('script');
|
|
// script.type = 'text/javascript';
|
|
// script.src = url;
|
|
// script.onerror = function() {
|
|
// console.error('Script loading failed');
|
|
// };
|
|
// document.head.appendChild(script);
|
|
// }
|
|
|
|
// // 调用函数,添加跨域资源
|
|
// addCrossDomainScript('http://192.168.0.146:9527');
|
|
|
|
window.onload = function() {
|
|
GrabImage();
|
|
}
|
|
function returnImageBase() {
|
|
//alert(1);
|
|
GrabImage();
|
|
//alert(result);
|
|
}
|
|
</script>
|
|
|
|
<!-- style="display: none" -->
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|