answersLogoWhite

0


Best Answer

document.getElementById('iFrame_ID).contentWindow.document.body.innerHTML;

/////////////////////////////////////////////////////////////

The above code is very vague so i thought i would update it:

$(function(){

$("#iframeid").load(function(){

var HTML = document.getElementById('iframeid').contentWindow.document.body.innerHTML;

alert(HTML);

});

});

Regards Phil Jackson

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you get content of iframe in javascript?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Which iframe attribute is used to define the restrictions to the frame content in HTML 5.0?

sandbox


What is the tag for an inline frame?

Inline frames are created using the IFRAME tag: <iframe src="sample.html" id="ourFrame"></iframe>


How do you change the size of an HTML iframe?

---- iframe {width: 500px; height: 500px;} ---- That's the CSS code for changing an iFrame's width and height. Insert it in the page the iFrame's in, or wherever you put your CSS. If you don't use CSS, or it doesn't work, try this: ---- <iframe src='linktopage' width='500' height='500'></iframe> ---- ...And that's the code for defining the width and height of an iFrame within the iFrame tag.


What are iframes?

An iframe (Inline FRAME) is an HTML structure that lets you embed an external page within another page. The iFrame is set up as a window frame of a specified size that scrolls along with the rest of the page, but the iFrame's content can itself be scrolled if it is larger than the iFrame window.I frames are used by popular sites such as "Digg" and by the Google Custom Search Engine to embed content on pages.Unlike the regular HTML frames function, which is used to divide the screen into multiple windows, the iFrame is typically used to insert an ad or small amount of text in the middle of a page.Frames allow a visual HTML Browser window to be split into segments, each of which can show a different document. This allows for lower bandwidth use, as repeating parts of a layout can be used in one frame, while variable content is displayed in another. This comes at a significant usability cost, especially in non-visual user agents.


How can you display your name in the frame tag in simple format?

You can apply the iframe tag. Inside the iframe tag you can apply the text.

Related questions

How can you close the iframe in calling page in php and javascript?

Using JavaScript, you can accomplish this by deleting the iframe node from the DOM.


How can you show another webpage in your site with javascript?

Not easily, browsers block that kind of thing deliberately.Try an iframe, using Javascript to change the source as needed. Some browsers will give a pop-up asking whether you want to allow this, others will require that you change the browser security settings.The easiest way to include content from other sites is to forgo the Javascript and do it on the server.


Which iframe attribute is used to define the restrictions to the frame content in HTML 5.0?

sandbox


Is it possible to find out the current URL of a site within an iframe - for example to add that link to a list of favorites?

In Javascript :- var CurrentUrl = document.getElementById('YourIFrameID').contentWindow.location.href;


How can you get info to be displayed on a web page without changing the page by clicking on a link or image?

You can use an iFrame or a pop-up window to display it. You can also use JavaScript too.


What is the tag for an inline frame?

Inline frames are created using the IFRAME tag: <iframe src="sample.html" id="ourFrame"></iframe>


How do you change the size of an HTML iframe?

---- iframe {width: 500px; height: 500px;} ---- That's the CSS code for changing an iFrame's width and height. Insert it in the page the iFrame's in, or wherever you put your CSS. If you don't use CSS, or it doesn't work, try this: ---- <iframe src='linktopage' width='500' height='500'></iframe> ---- ...And that's the code for defining the width and height of an iFrame within the iFrame tag.


How do you embed an iframe?

To embed an iframe in HTML, use the <iframe> tag. For example, to add a photo album in a project, I used something similar to: <iframe src="index-album/index.html"></iframe>. Notice that nothing needs to be between the opening and closing tags, but you must close the iframe tag. Also, you can add many modifiers to the tag, such as height and width, just as you could with a text area.


What are iframes?

An iframe (Inline FRAME) is an HTML structure that lets you embed an external page within another page. The iFrame is set up as a window frame of a specified size that scrolls along with the rest of the page, but the iFrame's content can itself be scrolled if it is larger than the iFrame window.I frames are used by popular sites such as "Digg" and by the Google Custom Search Engine to embed content on pages.Unlike the regular HTML frames function, which is used to divide the screen into multiple windows, the iFrame is typically used to insert an ad or small amount of text in the middle of a page.Frames allow a visual HTML Browser window to be split into segments, each of which can show a different document. This allows for lower bandwidth use, as repeating parts of a layout can be used in one frame, while variable content is displayed in another. This comes at a significant usability cost, especially in non-visual user agents.


How do you get the new Facebook info tabs?

1. Go to <a href="https://apps.facebook.com/buildiframetab/">Iframe Tab Plus</a> application on Facebook 2. Register an account at hostFB and access your profile 3. Go to iFrame Tab Plus and create a content for your new facebook tab 4. Once done, click "Publish to Facebook" and connect the tab with its content to your Facebook page That's it!


What are special codes which describe or define content in a Web document?

Tags. Tags such as <html>, <h1>, <p>, <ol>, and <li> to <marquee>, <var>, <iframe>, and <fieldset> define the content witihin them, and how they should be displayed on the web page.


Is javascript has facilities for communicating between web browser and http server?

Yes JavaScript can communicate with HTTP Server. It can hit Ajax request to request content from server.