zoukankan      html  css  js  c++  java
  • WebBrowser的简单使用

    加载初始网页

    this.webBrowser1.Url = new Uri("http://www.google.com");

    加载初始html

    webBrowser1.DocumentText =
        "<html><body>Please enter your name:<br/>" +
        "<input type='text' name='userName'/><br/>" +
        "<a href='http://www.microsoft.com'>continue</a>" +
        "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>" +
        "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>" +
        "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>"+                
        "</body></html>";

    webBrowser1.Navigate(@"D:A	est.html");

    加载pdf文件

    this.webBrowser1.Url = new Uri(@"D:pdfa.pdf");

    在html中嵌入pdf

    webBrowser1.DocumentText = "<html><body><p><center><h1> PDF in HTML </h1></center></p>" +
        "<object classid = 'clsid:CA8A9780-280D-11CF-A24D-444553540000' width = '100%' height = '720'>" +
        @"<param name = 'SRC' value = 'D:pdfa.pdf'>" +
        @"<embed width = '100%' height = '400' fullscreen = 'yes' src = 'D:pdfa.pdf'>" +
        "<noembed></noembed></embed></object></body></html>";
  • 相关阅读:
    记一次主从同步出现错误
    Mycat的学习
    MHA高可用集群
    MySQL进行 行累计
    设定从某个时间执行脚本,直到现在
    跟踪数据
    爬虫笔记
    爬虫练习
    css3-文本阴影
    vue生命周期
  • 原文地址:https://www.cnblogs.com/jizhiqiliao/p/9995772.html
Copyright © 2011-2022 走看看