Jquery is used to obtain the tag value under the same-source iframe body. jqueryiframe

Source: Internet
Author: User

Jquery is used to obtain the tag value under the same-source iframe body. jqueryiframe

Test.html

Html code

<!DOCTYPE HTML> 

Login.html

Html code

<! DOCTYPE html> 

Note: The same source must be used.


How does Jquery obtain the html of the body in iframe?

If you are using your own webpage, you can do this, $ ("iframe"). contents (). find ("body" ).html ();
Obtain the content of the page body in iframe.
Similarly, $ ("iframe"). contents (). find ("body"). height (); gets the height, and so on.
I hope I can help you.
 
How to Use jquery to obtain the content in iframe

How can the Framework Code be written to the body? Put it outside the body, put the body tag in the noframes tag, and write the response ({{frames}'header'}.document.body}.html ()

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.