请教该种情况下如何设置结束字符串?
var desc='<span style="FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\';">这是内容内容内容内容</span>';这里可以确认不变的就是以var desc='开头,以';结尾,但是现在内容里边也出现了'Times New Roman\';,结果在这个地方就停止了。请教如何设置可以采集全部内容? 贴源码出来的啦 源码:
var desc='<div align="center"><img alt="" src="http://tu.100xiu.net/daflogo.jpg" width="650" /></div><table align="center" border="0" cellpadding="0" cellspacing="0" width="610"><tr><td><p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><font color="#ff8080" size="3"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 3.4pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><b> 此款文胸有以下特点:<br /> <br />1、无痕的设计点符合现代文胸的舒适主义观点。<font color="#ff8080" style="BACKGROUND-COLOR: #ffff80">还赠送隐形肩带一副哦~<br /></font><br /><br />2、立体的四分之三罩杯,定型海绵!无插片!<br /></b></span></font></span></span></p><p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><font color="#ff8080" size="3"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 3.4pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><b>3、柔滑面料,贴身,轻柔。与胸部完美贴合,胸型饱满,圆润自然;精致的罩面,带来外观上的完美视觉享受。<br /></b></span></font></span></span></p><p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><font color="#ff8080" size="3"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 3.4pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><b>4、吸汗,集中,强效聚拢胸部。挂脖的纤细肩带可以混搭更多种类的衣服。<br /></b></span></font></span></span></p><p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><font color="#8080c0" size="3"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 3.4pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><b>本款文胸有黑色、白色、肤色、紫色、红色共五色,共有70、75、80三个码,每码均有A、B罩杯。</b></span></font></span></span></p><p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><font color="#282828" size="2"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 3.4pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"></span></font></span></span> </p><p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><font color="#282828" size="2"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 3.4pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><b><font color="#8080ff"></font></b></span></font></span></span> </p><p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><font color="#8080ff" size="2"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 3.4pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><b></b></span></font></span></span></p><p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; LETTER-SPACING: 1pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"><font color="#282828" size="2"><span style="FONT-FAMILY: 宋体; LETTER-SPACING: 3.4pt; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: \'Times New Roman\'; mso-hansi-font-family: \'Times New Roman\'"></span></font></span></span> </p></td></tr><tr><td><img alt="" src="http://tu.100xiu.net/dafchima.jpg" width="610" /></td></tr><tr><td><div align="center"><img alt="" src="http://tu.100xiu.net/daf/0811/WX051-5.jpg" /></div></td></tr><div align="center"><img alt="" src="http://tu.100xiu.net/daf/0811/WX051-4.jpg" /></div><div align="center"><img alt="" src="http://tu.100xiu.net/daf/0811/WX051-3.jpg" /></div><div align="center"><img alt="" src="http://tu.100xiu.net/daf/0811/WX051-2.jpg" /></div><div align="center"><img alt="" src="http://tu.100xiu.net/daf/0811/WX051-1.jpg" /></div><tr><td><div align="center"><img alt="" src="http://tu.100xiu.net/daf/0811/WX051-1_01.jpg" /></div></td></tr></table>';
我想采集整个内容,但是以';作为结束字符串的话就出提前停止 在写规则的时候注意控制范围,可以多用(*)这类的来控制 给网页地址吧 你截的也太乱了 如果内容中间会出现....';...
结尾是';
怎么写结束字符串可以采集结尾之前的内容?
页:
[1]