日照市东港区创新电子技术中心
ndfweb.cn

用VB实现对WEBBROWSER1中内容的全选,复制,粘贴


2008-12-22 18:28:45 (7489)


Private Sub Command1_Click()
WebBrowser1.Document.body.focus
WebBrowser1.Document.execCommand "SelectAll"
End Sub

Private Sub Command2_Click()
WebBrowser1.Document.execCommand "copy"
End Sub

Private Sub Command3_Click()
WebBrowser1.Document.execCommand "paste"
End Sub

Private Sub Form_Load()
WebBrowser1.Navigate "www.google.com"
Command1.Enabled = False
Command1.Caption = "全选"
Command2.Enabled = False
Command2.Caption = "复制"
Command3.Enabled = False
Command3.Caption = "粘贴"
End Sub



Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
End Sub 了解更多请访问:http://www.ndfweb.cn/news-87.html
  NDF俱乐部
  国际域名注册
  建站咨询
合作伙伴:万网 | 新网 | 新网互联 NDF网站建设淘宝店 | 实用工具 | 外貿網站建設 | 联系我们
鲁公网安备 37110202000336号 Sitemap - RSSRSS订阅