日期:2014-05-19  浏览次数:20385 次

问个问题.
rt=unescape(xmlhttp.responseText);
rt的内容如下。
rt   =   "abcdefg   wwwdotsohudotcom  

<!DOCTYPE   html   PUBLIC   \ "-//W3C//DTD   XHTML   1.0   Transitional//EN\ "   \ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\ ">

<html   xmlns=\ "http://www.w3.org/1999/xhtml\ "   >
<head> <title>
公司抬头
</title> </head>
<body>

我只想定义个变量ss= "abcdefg   wwwdotsohudotcom   "其他的都去掉该怎么做。


------解决方案--------------------
rt = rt.Substring(0,rt.IndexOf( '\r '));
------解决方案--------------------
比如你请求的是x.aspx,把x.aspx中除 <% page ...%> 之外的其他代码全部去掉。
------解决方案--------------------
Response.End()
或者去掉除 <% page ...%> 之外的其他代码。