回覆列表
  • 1 # zyzzf17081

    rivate Sub Command1_Click()Dim YDMYDM = WebBrowser1.Document.body.createtextrange().htmltextOpen "D:\WEB.html" For Output As #1Print #1, YDMClose #1End Sub=================工程裡引用:Microsoft HTML object Library工程裡部件:Microsoft Internet controlsMicrosoft rich textbox controls 6.0 (SP6)在窗體中放置一個WEBbrowser控制元件,放置一個richtextbox控制元件程式碼:Private Sub Form_Load()WebBrowser1.Navigate "http://www.sohu.com"End SubPrivate Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)Text1.Text = WebBrowser1.Document.documentElement.outerHTMLEnd Sub如需修改網頁內容,增加以下程式碼:Private Sub Command1_Click()Dim wdoc As HTMLDocumentSet wdoc = WebBrowser1.Documentwdoc.body.innerHTML = "dfkdjfkdfjdkfjdkfjdk" ‘網頁內容"WebBrowser1.Document.body.innerHTML = "dfkdjfkdfjdkfjdkfjdk" 與上句二選一End Sub

  • 中秋節和大豐收的關聯?
  • 請問卡車斷氣剎的工作原理是什麼?謝謝詳解?