Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kanban-nanjing-11
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
caolun
kanban-nanjing-11
Commits
41c68210
Commit
41c68210
authored
May 29, 2024
by
Allencl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f3d75ec4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
140 additions
and
0 deletions
+140
-0
index1.html
index1.html
+64
-0
index22.html
index22.html
+38
-0
index33.html
index33.html
+38
-0
No files found.
index1.html
0 → 100644
View file @
41c68210
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"renderer"
content=
"webkit"
/>
<!-- <title>精工底盘运营管理</title> -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/common.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/animate.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/index.css"
/>
<script
type=
"text/javascript"
src=
"js/jquery.js"
></script>
<!-- <script type="text/javascript" src="js/common.js"></script> -->
<!-- <script type="text/javascript" src="js/wow.js"></script> -->
<!-- <script>new WOW().init();</script> -->
</head>
<body>
<div>
<iframe
id=
"myiframe1"
style=
"width: 800px;height: 800px;border: 2px solid red;"
src=
"./index22.html"
frameborder=
"0"
></iframe>
<iframe
id=
"myiframe2"
style=
"width: 800px;height: 800px;border: 2px solid red;"
src=
"./index33.html"
frameborder=
"0"
></iframe>
</div>
<script>
$
(
document
).
ready
(
function
()
{
// 父页面
// 向第一个子页面 发消息
var
iframe1
=
document
.
getElementById
(
'
myiframe1
'
).
contentWindow
;
var
_json1
=
{
a
:
1
,
b
:
2
,
c
:
3
,
}
setTimeout
(()
=>
{
iframe1
.
postMessage
(
JSON
.
stringify
(
_json1
),
'
*
'
);
},
1000
)
// 向第二个子页面 发消息
var
iframe2
=
document
.
getElementById
(
'
myiframe2
'
).
contentWindow
;
var
_json2
=
{
a
:
6666
,
b
:
2777
,
c
:
888
,
}
setTimeout
(()
=>
{
iframe2
.
postMessage
(
JSON
.
stringify
(
_json2
),
'
*
'
);
},
3000
)
});
</script>
</body>
</html>
\ No newline at end of file
index22.html
0 → 100644
View file @
41c68210
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"renderer"
content=
"webkit"
/>
<!-- <title>精工底盘运营管理</title> -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/common.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/animate.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/index.css"
/>
<script
type=
"text/javascript"
src=
"js/jquery.js"
></script>
<!-- <script type="text/javascript" src="js/common.js"></script> -->
<!-- <script type="text/javascript" src="js/wow.js"></script> -->
<!-- <script>new WOW().init();</script> -->
</head>
<body>
<div>
<h1
style=
"color: #fff;"
>
第一个子页面
</h1>
<h1
style=
"color: #fff;"
>
数据
</h1>
<h1
id=
"id111111"
style=
"color: #fff;"
>
数据
</h1>
</div>
<script>
$
(
document
).
ready
(
function
()
{
// 子页面 监听父页面消息
window
.
addEventListener
(
'
message
'
,
function
(
event
=
{})
{
const
_data
=
JSON
.
parse
(
(
event
.
data
||
"
{}
"
)
)
// console.log( _data );
$
(
"
#id111111
"
).
html
(
JSON
.
stringify
(
_data
))
},
false
);
});
</script>
</body>
</html>
\ No newline at end of file
index33.html
0 → 100644
View file @
41c68210
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"renderer"
content=
"webkit"
/>
<!-- <title>精工底盘运营管理</title> -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/common.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/animate.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/index.css"
/>
<script
type=
"text/javascript"
src=
"js/jquery.js"
></script>
<!-- <script type="text/javascript" src="js/common.js"></script> -->
<!-- <script type="text/javascript" src="js/wow.js"></script> -->
<!-- <script>new WOW().init();</script> -->
</head>
<body>
<div>
<h1
style=
"color: #fff;"
>
第二个子页面
</h1>
<h1
style=
"color: #fff;"
>
数据
</h1>
<h1
id=
"id22222"
style=
"color: #fff;"
>
数据
</h1>
</div>
<script>
$
(
document
).
ready
(
function
()
{
// 子页面 监听父页面消息
window
.
addEventListener
(
'
message
'
,
function
(
event
=
{})
{
const
_data
=
JSON
.
parse
(
(
event
.
data
||
"
{}
"
)
)
// console.log( _data );
$
(
"
#id22222
"
).
html
(
JSON
.
stringify
(
_data
))
},
false
);
});
</script>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment