ÈçºÎÓÐÒ»¸ö×Ö·û´®ÊÇÕâÑùµÄÐÎʽ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 ;
}
......
Ë«ÒýºÅ£º"»ò"
µ¥ÒýºÅ£º'»ò'£¨IEʵÌåÃûÎÞЧ£©
&·ûºÅ£º&»ò&
<СÓÚ£º<»ò<
>´óÓÚ£º>»ò>
¿Õ¸ñ£º »ò 
¡êÓ¢°õ£º£»ò£
£¤Ôª£º¥»ò¥
¦·Ö¸ô·û£º¦»ò¦
§·Ö½Ú·û£º§»ò§
©°æȨ·û£º©»ò©
®×¢²á·û£º®»ò®
™É̱ê·û£º™»ò™
°¶È£º°»ò°
±¼Ó¼õ·û£º±»ò±
·¼ä¸ô·û£º·»ò·
׳˺ţº×»ò×
÷³ýºÅ£º÷»ò÷
Å·Ôª·ûºÅ£º€»ò€
»»ÐзûºÅ£º »ò ......
Ëæ×Å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ÊôÐÔÈç¹ûÓ뵱ǰҳÃæ´¦ÓÚͬһÓòÃûÏ ......
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;
......
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;
......
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 ³¬Á´½Ó ÊôÐÔ
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 ......