当前位置:网站首页>Iframe is simple to use, iframe is obtained, iframe element value is obtained, and iframe information of parent page is obtained
Iframe is simple to use, iframe is obtained, iframe element value is obtained, and iframe information of parent page is obtained
2022-06-25 08:28:00 【Pursue ~】
List of articles
1.iframe Easy to use
<iframe> The label specifies an inline framework .
An inline framework is used in the current HTML Embed another document in the document .
<iframe width=420 height=330 frameborder=0 scrolling=auto src=URL></iframe>
- width Insert the width of the page ;
- height Insert page height ;
- scrolling Whether to display the page scroll bar ( The optional parameters are auto、yes、no, If you omit this parameter , The default is auto);
- frameborder The frame size ;
Be careful :URL Absolute path is recommended
<iframe width=0 height=0 frameborder=0 scrolling=auto src=WWW .webjx.com></iframe>
If a page has a frame , Click the link in the page , Request in this <iframe> Open in . stay <iframe > Specified in the name
<iframe name=** ></iframe>
Then change the default open mode ,: Webpage head Medium plus <a href=URL target=**> Or partially connected target frames are set to (**)
To insert a page . Ask for only the middle part . Nothing else .
Code :
<iframe name=123 align=middle marginwidth=0 marginheight=0 vspace=-170 hspace=0 src="http://www.webjx.com/" frameborder=no scrolling=no width=776 height=2500></iframe>
Controls the depth at which the inserted page is covered by the frame marginwidth=0 marginheight=0; Control the depth of the upper part covered by the frame vspace=-170
scrolling Scroll bar Yes No (auto、yes、no) frameborder Frame border size ,width=776 height=2500 The size of this frame .
2. obtain iframe
Common methods of getting elements ,dom ,jQ etc. ;
var ifr = document.getElementById(‘mainIframe0’)
3. obtain iframe Element value
ifr.contentWindow
Get is window object
Window {
postMessage: ƒ, blur: ƒ, focus: ƒ, close: ƒ, parent: Window,
…}
ifr.contentWindow. value Defined global variables .
4.iframe Get the information of the parent page :
Get the value of the parent page element :
jquery The way :$("#auditDate",parent.document).val();
js The way :parent.document.getElementById(“auditDate”).value;
边栏推荐
- TCP stuff
- QSS 不同风格的按钮
- Log in to MySQL 5.7 under ubuntu18 and set the root password
- Rqt command
- Biweekly investment and financial report: capital ambush Web3 infrastructure
- Stack awareness - stack overflow instance (ret2libc)
- 钱堂教育商学院给的证券账户安全吗?能开户吗?
- Want to open an account, is it safe to open an online stock account?
- Luogu p2048 [noi2010] super Piano (rmq+ priority queue)
- 六月集训(第25天) —— 树状数组
猜你喜欢

Static web server

420 sequence traversal of binary tree 2 (429. sequence traversal of n-ary tree, 515. find the maximum value in each tree row, 116. fill in the next right node pointer of each node, 104. maximum depth

Bluecmsv1.6- code audit

初体验完全托管型图数据库 Amazon Neptune

leetcode. 13 --- Roman numeral to integer

GPU calculation

STM32CubeMX 學習(5)輸入捕獲實驗

How is the ISM model analyzed?

初识生成对抗网络(11)——利用Pytorch搭建WGAN生成手写数字

Sword finger offer (medium level)
随机推荐
Scanpy(七)基于scanorama整合scRNA-seq实现空间数据分析
4個不可不知的采用“安全左移”的理由
[supplementary question] 2021 Niuke summer multi school training camp 6-n
After using the remote control of the working machine, problems occurred in the use of the local ROS, and the roscore did not respond
Network model -- OSI model and tcp/ip model
软件工程复习题
VOCALOID notes
钱堂教育商学院给的证券账户安全吗?能开户吗?
家庭服务器门户Easy-Gate
是否可以给数据库表授予删除列对象的权限?为什么?
What do various optimizers SGD, adagrad, Adam and lbfgs do?
Deep learning series 45: overview of image restoration
Is there no risk in the security of new bonds
Rank sum ratio (RSR) index calculation
Not afraid of losing a hundred battles, but afraid of losing heart
Electronics: Lesson 009 - Experiment 7: study relays
[supplementary question] 2021 Niuke summer multi school training camp 1-3
NIPS 2014 | Two-Stream Convolutional Networks for Action Recognition in Videos 阅读笔记
打新债的安全性 有风险吗
What is SKU and SPU? What is the difference between SKU and SPU