Use webbrowser to easily simulate web page sources

Source: Internet
Author: User

I am only talking about a small skill in webbrowser I personally use today. If you are a master, you may not need to continue reading it!

As we all know, webbrowser is a small browser control provided by. net. Of course, it has a lot of use and I will not introduce it here,

A small method is used to explain a problem I encountered and solved in my work!

You may have encountered manyProgramAll pages determine the source of the domain name. If you open a page separately, you will not be able to open the page, and you do not know where its navigation connection is,

What should we do if we encounter such a problem?

I don't know whether the webbrowser control has a document nature. We can use the document property to access the page elements in the open web page,

For example, if you want to access the body element of the opened page, you can access it through webbrowser. Document. Body.

Insert Part in BodyCodeThen you can directly Insert the content you want to put through the webbrowser. Document. Body. innerhtml syntax!

Then, you only need to use the content to connect to any of their pages first, and then solve the navigation connection through webbrowser. Document. Body. innerhtml!

In a similar way, you can use webbrowser to simulate page login.

Due to the time relationship, let's get here today. If you have any questions, please follow the post and we will discuss and learn together.

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.