当前位置:网站首页>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;
边栏推荐
- 初识生成对抗网络(11)——利用Pytorch搭建WGAN生成手写数字
- How do I install the software using the apt get command?
- In 2022, which industry will graduates prefer when looking for jobs?
- 打新债安不安全 有风险吗
- 在二叉树(搜索树)中找到两个节点的最近公共祖先(剑指offer)
- How to interpret the information weight index?
- 如何成为一名软件测试高手? 月薪3K到17K,我做了什么?
- How to analyze the grey prediction model?
- Scanpy (VII) spatial data analysis based on scanorama integrated scrna seq
- 钱堂教育商学院给的证券账户安全吗?能开户吗?
猜你喜欢

How to analyze the coupling coordination index?

Socket problem record

图像超分综述:超长文一网打尽图像超分的前世今生 (附核心代码)

Sword finger offer (medium level)

第五天 脚本与UI系统

How to calculate the D value and W value of statistics in normality test?

How to interpret the information weight index?

The era of enterprise full cloud -- the future of cloud database

Unity addressable batch management

NIPS 2014 | Two-Stream Convolutional Networks for Action Recognition in Videos 阅读笔记
随机推荐
[QT] QT 5 procedure: print documents
How to calculate critical weight indicators?
使用apt-get命令如何安装软件?
Socket problem record
How to analyze the grey prediction model?
第五天 脚本与UI系统
想要软件测试效果好,搭建好测试环境是前提
Luogu p2048 [noi2010] super Piano (rmq+ priority queue)
First experience Amazon Neptune, a fully managed map database
Free SSL certificate acquisition tutorial
Wechat applet introduction record
打新债安全不 有风险吗
Remove headers from some pages in a word document
Rqt command
How do I install the software using the apt get command?
[supplementary question] 2021 Niuke summer multi school training camp 1-3
leetcode. 13 --- Roman numeral to integer
Nips 2014 | two stream revolutionary networks for action recognition in videos reading notes
Is there any risk in making new bonds
Scanpy (VII) spatial data analysis based on scanorama integrated scrna seq