• Webbrowser在鼠标选中的地方插入文本


    using System;

    using System.Collections.Generic;

    using System.ComponentModel;

    using System.Data;
    using System.Drawing;

    using System.Text;
    using System.Windows.Forms;

    using mshtml;
    //添加引用 .Net-Microsoft.mshtml

    namespace WindowsApplication
    {
      public partial class Form1 : Form
      
        {
        
              public Form1()
        
               {

                InitializeComponent();
          
                this.webBrowser1.Navigate("www.google.cn");
        
                }
     

     
        
              private void button1_Click(object sender, EventArgs e)
        
                {
          
                IHTMLDocument2 doc = (IHTMLDocument2)            this.webBrowser1.Document.DomDocument;
          
                 IHTMLTxtRange range = doc.selection.createRange() as IHTMLTxtRange;
              range.pasteHTML(range.text+"<div>jinjazz 路过</div>");
        
                 }
      
         }

    }
  • 相关阅读:
    PMP工具与技术篇--4.4.1-1 储备分析
    PMP--4.4 规划成本管理--成本管理计划
    PMP--4.3.4-2 进度基准
    PMP工具与技术篇--4.3.4-1 关键路径分析
    PMP--4.3.4-1 项目进度计划
    pip超时问题解决
    BurpSuite插件_sqlipy
    文件上传漏洞
    SSL安全评估工具
    子域名爆破工具
  • 原文地址:https://www.cnblogs.com/lujin49/p/2364476.html
Copyright © 2020-2023  润新知