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

c#´ÓhtmlÖлñȡͼƬµØÖ·

 
using System.Text.RegularExpressions;
string ohtml = this.TextBox1.Text;
            System.Text.RegularExpressions.MatchCollection m;
            //ÌáÈ¡×Ö·û´®µÄͼƬ
            m = Regex.Matches(ohtml, "(<img).*?>");
            for (int i = 0; i < m.Count; i++)
            {
                string ostr = m[i].ToString();
                //ÌáȡͼƬµÄµØÖ·
                System.Text.RegularExpressions.MatchCollection m2;
                m2 = Regex.Matches(ostr, "(src=)['|\"].*?['\"]");
                for (int j = 0; j < m2.Count; j++)
                {
                    string strTemp = m2[j].ToString();
                    strTemp = strTemp.Replace("src=", "");
                    strTemp = strTemp.Replace("\"", "");
                    strTemp = strTemp.Replace("'", "");
            


Ïà¹ØÎĵµ£º

HTML ¼òÊ·

HTML ÊÇ Web ͳһÓïÑÔ£¬ÕâЩÈÝÄÉÔÚ¼âÀ¨ºÅÀïµÄ¼òµ¥±êÇ©£¬¹¹³ÉÁËÈç½ñµÄ Web¡£1991 Ä꣬Tim Berners-Lee
±àдÁËÒ»·Ý½Ð×ö “HTML ±êÇ©”µÄÎĵµ£¬ÀïÃæ°üº¬ÁË´óÔ¼20¸öÓÃÀ´±ê¼ÇÍøÒ³µÄ HTML ±êÇ©¡£ËûÖ±½Ó½èÓà SGML
µÄ±ê¼Ç¸ñʽ£¬Ò²¾ÍÊǺóÀ´ÎÒÃÇ¿´µ½µÄ HTML ±ê¼ÇµÄ¸ñʽ¡£±¾ÎĽ²ÊöÁË HTML ÕâÃÅ Web ±ê¼ÇÓïÑԵķ¢Õ¹¼òÊ·¡£
......

HTML ±ê¼ÇµÄÔ­ÒåÊä³ö º¯Êý


function unhtml($content){
$content=htmlspecialchars($content);
$content=str_replace(chr(13),"<br>",$content);
$content=str_replace(chr(32),"&nbsp;",$content);
return trim($content);
}
......

NET Win HTML Editor ControlÆÆ½â¹ý³ÌÈ«¼Ç¼

ǰ¼¸Ìì×öÏîÄ¿¡£ÐèÒªÓõ½Ò»¸öWinFormµÄHTMLµÄ±à¼­ºÍÏÔʾ¿Ø¼þ¡£.NET×Ô¼º²¢Ã»ÓÐÌṩÕâ·½ÃæµÄ¿Ø¼þ¡£È¥Googel°Ù¶ÈÁËһϡ£Ã»ÓÐÕÒµ½ºÏÊʵÄ.NET¿Ø¼þ¡£ÎÞÄÎÈ¥Ó¢ÎÄGoogelÁËһϡ£¹ûÈ»·¢ÏÖÁËÒ»¿îÃûΪ£º.NET Win HTML Editor Control 3.2µÄ¿Ø¼þ¡£ÏÂÔØÅäÖû·¾³ÊÔÓ᣷¢ÏÖÃâ·Ñ°æÌṩȫ¹¦ÄÜÊÔÓá£Î¨Ò»²»ºÃµÄµØ·½¾ÍÊÇÔÚ±à¼­ÇøÓÐÒ»¸ö×¢²áµÄÁ ......

ÓйØÈ¥µôhtmlÖеÄÁ½¶Ë×Ö·û

ÈçºÎÓÐÒ»¸ö×Ö·û´®ÊÇÕâÑùµÄÐÎʽstr = "&bbbLAA";
ÏëµÃµ½"L"µÄ»°¿ÉÒÔÕâÑùȥʵÏÖ£º
//sDataStr = "&bbbLAA";
//sLeftQuote = ""&bbb";
//sRightQuote = "&AA";
µ÷ÓÃÕâ¸ö·½·¨½«µÃµ½L×ֶΡ£
function abCutString( sDataStr, sLeftQuote, sRightQuote)
{
 var sReturnVal = '';
 var nStart ......

asp.net(C#) Êý¾Ý¿â±¸·Ý»¹Ô­ Ô´Âë

Backup.aspx
  protected void Button1_Click(object sender, EventArgs e)
    {
        string path = Server.MapPath("") + @"\Backup";
        if (!Directory.Exists(path))
       ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ