Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : html

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

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

HTMLÌØÊâ×Ö·û

Ë«ÒýºÅ£º&quot;»ò&#34;
µ¥ÒýºÅ£º&apos;»ò&#39;£¨IEʵÌåÃûÎÞЧ£©
&·ûºÅ£º&amp;»ò&#38;
<СÓÚ£º&lt;»ò&#60;
>´óÓÚ£º&gt;»ò&#62;
¿Õ¸ñ£º&nbsp;»ò&#160;
¡êÓ¢°õ£º&pound;»ò&#163;
£¤Ôª£º&yen;»ò&#165;
¦·Ö¸ô·û£º&brvbar;»ò&#166;
§·Ö½Ú·û£º&sect;»ò&#167;
©°æȨ·û£º&copy;»ò&#169;
®×¢²á·û£º&reg;»ò&#174;
™É̱ê·û£º&trade;»ò&#8482;
°¶È£º&deg;»ò&#176;
±¼Ó¼õ·û£º&plusmn;»ò&#177;
·¼ä¸ô·û£º&middot;»ò&#183;
׳˺ţº&times;»ò&#215;
÷³ýºÅ£º&divide;»ò&#247;
Å·Ôª·ûºÅ£º&euro;»ò&#8364;
»»ÐзûºÅ£º&#10;»ò&#13; ......

²»Ó¦ºöÊÓµÄHTMLÓÅ»¯

Ëæ×ÅWeb2.0¼¼ÊõµÄ²»¶Ï·¢Õ¹£¬WebÇ°¶ËµÄÓÅ»¯Êܵ½Ô½À´Ô½¶àµÄ¹Ø×¢£¬ÌرðÊÇJavaScriptºÍCSSÓÅ»¯µÄÌÖÂÛÒ»Ö±ÊÇÈȵ㣬¹¤¾ßÒ²Ïà¶Ô·á¸»£¬¶ø¶ÔHTMLÓÅ»¯ÔòÓÐËùºöÊÓ£¬×î½ü£¬À´×԰ٶȷºÓû§ÌåÑéÍŶӵŤ³ÌʦMiller£¨chenminliang£©×«ÎÄÇ¿µ÷ÁËHTMLÓÅ»¯µÄÖØÒªÐÔºÍÏà¹Ø¼¼ÇÉ¡£
MillerÊ×ÏȾÙÀý˵Ã÷ÁËHTMLÓÅ»¯ÉÔÏÔºöÂÔµÄÊÂʵ£º
ÔÚSteve SoudersµÄ´ó×÷¡¶Even Faster Web Sites¡·ÖÐ̸µ½·Ç³£¶àÓÐЧµÄÇ°¶ËÓÅ»¯·½·¨£¬ÀýÈçJavascriptµÄ¼ÓÔØ¡¢CSSÑ¡Ôñ·û¡¢Í¼Æ¬ÓÅ»¯¡¢gzip¡¢iframeÎÊÌâµÈ£¬Î¨¶ÀûÓÐϸ˵HTMLÓÅ»¯¡£
ËûÇ¿µ÷HTMLÓÅ»¯ËäÈ»¿´ËÆ΢С£¬µ«ÊDz»¿ÉºöÊÓ£º
ÔÚÕû¸öÇ°¶ËµÄ¹¹³ÉÖУ¬HTMLÊDZز»¿ÉÉÙµÄÒ»²¿·Ö£¬¶øÇÒÊÇÕæÕýµÄչʾ“Ç°¶Ë”¡£ËäÈ»Ó붯éüÊ®¼¸KµÄJavascriptÏà±È£¬HTMLµÄ´óСÔÚÕû¸öÒ³Ãæ×ÊÔ´ÖÐÒ»°ã²»»áռ̫¶àµÄ±ÈÖØ£¬¶øÇÒ»¹ÓÐGzip£¬µ«ÊÇÊÂʵ±íÃ÷£¬´ó¶àÊýÒ³Ã涼ÓнϴóµÄѹËõÓàµØ£¬¼´Ê¹ÊÇGzip¹ýºóÈÔÈ»ÄܼõС¿É¹ÛµÄÌå»ý...
MillerÔÚÎÄÖÐ×ܽáÁËHTMLÓÅ»¯µÄ¸÷ÖÖ·½·¨£¬½«Æä·ÖΪÁ½ÀࣺÂÌÉ«¹æÔò——ÔÚ¸÷ÀàÒ³ÃæÖÐÊÊÓÃÇÒÎÞº¦ºÍ³ÈÉ«¹æÔò——ÔÚijЩ¾ßÌåµÄÇé¿öϲÅÊÊÓûòÕßÓÐÎ¥±ê×¼¡£
ÂÌÉ«¹æÔò¿ÉÒÔ¸ÅÀ¨ÎªÒÔϼ¸ÖÖ£º
ʹÓÃÏà¶ÔURL£¬Ä³Ð©href¡¢srcÊôÐÔÈç¹ûÓ뵱ǰҳÃæ´¦ÓÚͬһÓòÃûÏ ......

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;
         ......

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;
         ......

¸Õ¸ÕÕÒ³öÀ´µÄÏà¶Ô׼ȷµÄ²éÕÒHTMLµÄÕýÔò±í´ïʽ

Dim objReg,objMatches,objMatch
Set objReg=new RegExp
objReg.Global=True
objReg.IgnoreCase=True
objReg.Pattern="<('[^']*'|""[^""]*""|[^'"">])*?>"
Set objMatches=objReg.Execute(×Ö·û´®)
For Each objMatch In objMatches
ÕÒµ½µÄHTML £ºobjMatch.value
Next
Set objMatches=Nothing
Set objReg=Nothing
ÓÉÓÚ½ñÌì²éÕÒ
<img onclick='if(this.width>100) tihs.width=100' src="/xxx.jpg" />
ʱ·¢ÏÖ<[^>]+>µÄÑÏÖز»×ã
µ«ÊÇÍøÉÏÕÒ²»µ½ÈκÎ׼ȷµãµÄ£¬ÌØдһ¸ö£¬ÒÔ±¸ÒÔºó¿ÉÄÜÐèÒª¡£
²éÕÒimgÕýÔò
<([^\s]+)\s('[^']*'|""[^""]*""|[^'"">])*?> ......

html ³¬Á´½Ó a ÊôÐÔ

html ³¬Á´½Ó ÊôÐÔ
HTML ʹÓ󬼶Á´½ÓÓëÍøÂçÉϵÄÁíÒ»¸öÎĵµÏàÁ¬¡£
ê±êÇ©ºÍ Href ÊôÐÔ
HTML ʹÓà <a> £¨Ãª£©±êÇ©À´´´½¨Á¬½ÓÁíÒ»¸öÎĵµµÄÁ´½Ó¡£
ê¿ÉÒÔÖ¸ÏòÍøÂçÉϵÄÈκÎ×ÊÔ´£ºÒ»ÕÅ HTML Ò³Ã棬һ·ùͼÏñ£¬Ò»¸öÉùÒô»òÊÓƵÎļþµÈµÈ¡£
´´½¨ÃªµÄÓï·¨£º
<a href="url">Text to be displayed</a>
ÀýÈ磺
<a href="http://www.haohaox8.com>ÕâÀï¿ÉÒÔ·ÅÎÄ×Ö£¬Ò²¿ÉÒÔ·ÅͼƬ</a>
¿ÉÑ¡µÄÊôÐÔ
DTD ָʾ´ËÊôÐÔÔÊÐíÔÚÄÄÖÖ DTD ÖÐʹÓá£S=Strict, T=Transitional, F=Frameset.
ÊôÐÔÖµÃèÊöDTDcharset±ê×¼×Ö·û¼¯µÄÃû³Æ¹æ¶¨Ä¿±ê URL µÄ×Ö·û±àÂë¡£STFcoords ²Î¼û coords ÊôÐÔºÍ shape ÊôÐÔSTFhrefURLÁ´½ÓµÄÄ¿±ê URL¡£STFhreflangISO ±ê×¼µÄË«×Ö·ûÓïÑÔ´úÂë¹æ¶¨Ä¿±ê URL µÄ»ù×¼ÓïÑÔ¡£STFnamesection_nameÃüÃûÒ»¸öê¡£ÇëʹÓôËÊôÐÔÔÚÎĵµÖд´½¨Ä³¸öÊéÇ©¡£ÔÚXHTMLµÄδÀ´°æ±¾ÖУ¬nameÊôÐԻᱻidÊôÐÔÈ¡´ú£¡STFrelalternate designates stylesheet start next prev contents index glossary copyright chapter section subsection appendix help bookmark ¹æ¶¨µ±Ç°ÎĵµÓëÄ¿±ê URL Ö®¼äµÄ¹Øϵ¡£STFrevalternate designates stylesheet start next prev conten ......
×ܼǼÊý:583; ×ÜÒ³Êý:98; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [7] [8] [9] [10] 11 [12] [13] [14] [15] [16]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ