当前位置:网站首页>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;
边栏推荐
- How to calculate the fuzzy comprehensive evaluation index? How to calculate the four fuzzy operators?
- Is there any risk in making new bonds
- What about the exponential smoothing index?
- 股票网上开户安全吗?小白求指导
- 4个不可不知的采用“安全左移”的理由
- Not afraid of losing a hundred battles, but afraid of losing heart
- Free SSL certificate acquisition tutorial
- Is there no risk in the security of new bonds
- Common action types
- 打新债安不安全 有风险吗
猜你喜欢

家庭服务器门户Easy-Gate

Self made ramp, but it really smells good

Bluecmsv1.6-代码审计

How to interpret the information weight index?

Stm32cubemx learning (5) input capture experiment

Network model -- OSI model and tcp/ip model

Mr. Tang's lecture on operational amplifier (Lecture 7) -- Application of operational amplifier

VOCALOID notes

Apache CouchDB Code Execution Vulnerability (cve-2022-24706) batch POC

使用apt-get命令如何安装软件?
随机推荐
4 reasons for adopting "safe left shift"
Overview of image super score: the past and present life of image super score in a single screen (with core code)
Static web server
Use Adobe Acrobat pro to resize PDF pages
Scanpy(七)基于scanorama整合scRNA-seq实现空间数据分析
Electronics: Lesson 009 - Experiment 7: study relays
TS environment setup
In 2022, which industry will graduates prefer when looking for jobs?
RMQ interval maximum subscript query, interval maximum
Can I grant database tables permission to delete column objects? Why?
Rosparam statement
2022年毕业生求职找工作青睐哪个行业?
Similarity calculation method
Measure the current temperature
What problems do you worry about when you want to switch to software testing?
Common SRV types
在网上股票开户安全吗?证券账户可以给别人用吗?
Sword finger offer (medium level)
Paper:Generating Hierarchical Explanations on Text Classification via Feature Interaction Detection
Is the securities account given by Qiantang education business school safe? Can I open an account?