WebBrowser Implementing editing Web pages

Source: Internet
Author: User

1 //1. Display Web page2 proceduretform2.formcreate (sender:tobject);3 begin4Panel1.align: =Altop;5Checkbox1.anchors: =[Aktop, akright];6Button1.anchors: =checkbox1.anchors;7Checkbox1.caption: ='Edit';8Button1.caption: ='Display Web page text';9Webbrowser1.align: =alclient;TenWebBrowser1.Navigate ('http://www.cnblogs.com/del/archive/2009/04/16/1437417.html'); One End; A  - //2. Edit Web pages - procedureTform2.checkbox1click (sender:tobject); the begin -    {This is where the entire page can be edited, or an element can be edited individually} -WebBrowser1.OleObject.document.body.contentEditable: =checkbox1.checked; -    {Some browsers require this setting: Document.designmode = "on";} + End; -  + //3. Display Web page text A procedureTform2.button1click (sender:tobject); at begin - ShowMessage (WebBrowser1.OleObject.document.body.innerText); - End;

WebBrowser Implementing editing Web pages

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.