asp生成静态页时如果页面里面有如 <script language="javascript" src="article/News.asp?Sid=9&Num=5"></script> 的代码,读取htm内容的时候不会把News.asp里相应的内容显示出来,而是就一个 <script language=……></script>,生成的页面就不完全!,怎么解决?
index.asp页面要调用新闻,我写在news.asp里面,然后在index.asp里面 <script language="javascript" src="article/News.asp?Sid=8&Num=5"></script> 其中8是文章分类id,5是文章数 News.asp里面 <% Sid=Request.QueryString("Sid") listNum=Request.QueryString("Num") Sql="SELECT TOP "& listNum &" title,articleid FROM Article WHERE Sid="& Sid& " ORDER BY hits desc,articleid asc" Set Rs=Server.CreateObject("ADODB.Recordset") Rs.Open Sql,Conn,1,1 Response.Write"document.write('<table width=""100%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">');" Do while not Rs.eof %> document.write('<tr><td height="18"><img src="image/dot.gif" /><a href="article/read.asp?id=<%=Rs("articleid")%>" target="_blank" title="<%=Replace(Rs("title"),"'","")%>"><%=getchar(Replace(Rs("title"),"'",""),45)%></a></td></tr>'); <% Rs.movenext loop Response.Write"document.write('</table>');" Rs.close Set Rs=nothing Call CloseConn %> getchar 是取文章标题长度的 现在问题是我要把index.asp生成index.shtm,基本上正常,除了<script language……的地方,因为浏览器把它当js 我生成一个页面是采用这个方法