Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C#ÖÐʵÏÖWebBrowser¿Ø¼þµÄHTMLÔ´´úÂë¶Áд

³ÃÖÜÄ©ÏëÕÛÌÚÒ»ÏÂǶÈëASP.NETµÄWinForm³ÌÐò
ÐèÒªÓõ½WebBrowser¿Ø¼þµÄHTMLÔ´Âë¶Áд
¾Í°ÑÒÔÇ°µÄһЩ´úÂëƬ¶ÏÒÆÖµµ½C#ÏÂ
˳±ã·¢¸öÌû×Ó±¸Íü£¬ºÇºÇ
  
˼·ÆäʵºÜ¼òµ¥£¬Ö±½Óͨ¹ýdocument.documentElement.outerHTML
»òÕßʹÓÃIPersistStreamInit½Ó¿ÚÖ±½Ó¶ÔÁ÷½øÐд¦Àí
Ç°ÕßÎҾͲ»·Ï»°ÁË£¬ºóÕßʵÏÖ·½·¨ÈçÏÂ
  
Ê×ÏÈÊÇдÈëHTMLµ½Òѳõʼ»¯µÄWebBrowser¿Ø¼þ
³õʼ»¯¿ÉÒÔͨ¹ýNavigate("about:blank")Íê³É
±ØÐëÈ·±£WebBrowser.Document != null
·ñÔòÓ¦¸ÃÍƳٵ½DocumentCompleteʼþÔÙ¶Áд
  
UCOMIStream stream = null;
  
CreateStreamOnHGlobal(Marshal.StringToHGlobalUni(value), true, out stream);
   
if(stream != null)
  
{
    IPersistStreamInit persistentStreamInit =
      (IPersistStreamInit)WebBrowser.Document;
  
    persistentStreamInit.InitNew();
    persistentStreamInit.Load(stream);
    persistentStreamInit = null;
}
  
UCOMIStreamÊÇCOMÖÐIStreamµÄCLR°æ±¾
CreateStreamOnHGlobalº¯Êý´ÓÒ»¸ö×Ö·û´®µÄµØÖ·
´´½¨Ò»¸öIStream¹©Ê¹ÓÃ
  
[DllImport("ole32.dll", PreserveSig=false)]
static extern void CreateStreamOnHGlobal(IntPtr hGlobal,
    Boolean fDeleteOnRelease, [Out] out UCOMIStream pStream);
  
È»ºó¾ÍÊÇͨ¹ýIPersistStreamInit½Ó¿Ú³õʼ»¯²¢ÔØÈëHTMLÔ´Â룬
IPersistStreamInit½Ó¿ÚCLRȱʡûÓе¼È룬¶¨ÒåÈçÏÂ
  
[ComVisible(true), ComImport(), Guid("7FD52380-4E07-101B-AE2D-08002B2EC713"),
   InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
public interface IPersistStreamInit
{
    void GetClassID([In, Out] ref Guid pClassID);
  
    [return: MarshalAs(UnmanagedType.I4)] [PreserveSig]
    int IsDirty();
  
    void Load([In, MarshalAs(UnmanagedType.Interface)] UCOMIStream pstm);
    void Save([In, MarshalAs(UnmanagedType.Interface)] UCOMIStream pstm,
 


Ïà¹ØÎĵµ£º

×î½ü×Ô¼ºÔÚдjavascript/html/cssµÄÊ÷¿Ø¼þ

    Íê³ÉÒÔϲ¿·Ö£º
    1. Ê÷¿ÉÒÔ½ÓÊÜsingleXml¸ñʽºÍjsonÒÔ¼°jsonarray¸ñʽµÄÊý¾Ý£»
    2. ¸´Ñ¡¿ò¹´Ñ¡ºÍÕÛµþ×Ó½ÚµãµÄÂß¼­ÓÃdivǶÌ×À´ÊµÏÖ,ЧÂʸü¸ß;²¢ÌṩÁË¿ìËÙ»­Ê÷µÄ·½·¨;(´æÔÚbug:¿ìËÙ»­Ê÷ЧÂʲ¢²»¸ß,divǶÌ×ÓÐÎÊÌâ);
    3.Ôö¼ÓÊ÷µÄÉî¶È this.depth ......

html ±íµ¥Ìá½»µÄÁ½ÖÖ·½·¨µÄÇø±ð post get

<form action="#" method="get">ÕâÀïÊÇ±íµ¥µÄÄÚÈÝ</form>
<form action="#" method="post">ÕâÀïÊÇ±íµ¥µÄÄÚÈÝ</form>
ÊôÐÔ"action",ÀïÃæÉèÖõÄÊÇ±íµ¥Ìá½»µÄ·¾¶.Ò»¸ö¶ÔÏó,°×»°ÎĵĽâÊÍ:±íµ¥½»¸øÁËË­.
ÊôÐÔ"method",ÀïÃæÉèÖõÄÊÂ±íµ¥Ìá½»µÄ·½Ê½,Ò»ÖÖ·½·¨,°×»°ÎĽâÊÍ:ÒªÔõÑùÌá½»Õâ¸ö±íµ¥,ÊÇÎÒÖ±½Óà ......

ÔÚflexÖÐʹÓÃǶÈëhtmlÎļþÒÔ½â¾öÏÔʾhtmlµÄÎÊÌâ

ÏëÔÚflexÖÐÕæʵµÄÏÔʾhtml,µ«ÊÇtexteara,lable,textÖÐÖ»Ö§³Ö²¿·Öhtml±êÇ©
<a>¡¢<b>¡¢<br>¡¢<font>¡¢<img>Èç¹ûÓÃimgÓÖ´æÔÚÏÔʾ×Ô¶¯»»ÐеÄÎÊÌâ¡£Ö»ÓвÉÓÃǶÈëhtmlµÄ·½·¨À´½â¾ö¡£
1.flexdemo1
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe ......

asp.net C#ÍøÕ¾ÏîÄ¿ »ñÈ¡ÎïÀí·¾¶¡¢ÐéÄâ·¾¶µÄ·½·¨

-----------------------------.csÀàÎļþÖÐ
µ±Ç°ÏîÄ¿µÄÎïÀí·¾¶Â  
   
  strPath   =   this.Server.MapPath(Request.PhysicalApplicationPath);  
   
  ÄãҪ˵Ã÷ʲô“ÀàÎļþ”¡£ÈκÎPAGE¡¢CONTROL´úÂëÒ²ÊÇÔÚÀà ......

JAVAÇå³ýhtml¸ñʽÕýÔò±í´ïʽ


 public static String splitAndFilterString(String input, int length) {   
        if (input == null || input.trim().equals("")) {   
     &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ