asp的一个调用问题

nbblkjj 2004-09-02 01:22:59
新闻系统中的这样一代调用代码
news.asp?typeid=21&shu=7
我以前在主程序里这样写
<script src=news.asp?typeid=21&shu=7></script>

就可以调用出来
可是现在不知道怎么了,就是不会显示出来?

如果单单在地址栏中输入news.asp?typeid=21&shu=7,是会显示结果的。

请问这是为什么?
...全文
153 23 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
23 条回复
切换为时间正序
请发表友善的回复…
发表回复
nbblkjj 2004-09-02
  • 打赏
  • 举报
回复
谢谢大家,可以了

特别感谢zhzhuo(编程混饭吃)
dsclub 2004-09-02
  • 打赏
  • 举报
回复
这个帖子人气挺旺呀
nbblkjj 2004-09-02
  • 打赏
  • 举报
回复
好的,我去试试看。
phckt 2004-09-02
  • 打赏
  • 举报
回复
document.write里的"号全要换成\"
zhzhuo 2004-09-02
  • 打赏
  • 举报
回复
楼主,用iframe可以啊
我已经在自己的机器上测试过了
<iframe id=adframe marginwidth=0 marginheight=0 frameborder=0 scrolling=yes src='http://www.wendu.com.cn/Training/viewInfo.asp?infoId=11638' width=680 height=500></iframe>
你自己试试!
nbblkjj 2004-09-02
  • 打赏
  • 举报
回复
谁知道呀?帮帮我,急呢。
nbblkjj 2004-09-02
  • 打赏
  • 举报
回复
我把程序贴出来给你看看吧。
%
dim shu,news,bigclassid,smallclassid,specialid,order,time,path,click,title
bigclassid=request.querystring("bigclassid")
typeid=request.querystring("typeid")
smallclassid=request.querystring("smallclassid")
specialid=request.querystring("specialid")
shu=request.querystring("shu")
order=request("order")
time=request.querystring("time")
title=request.querystring("title")
click=request.querystring("click")
Path = "./"
if shu<>"" then '显示数目,不加为10
ss=shu
else
ss=10
end if
if order="click" then '排序方式,click为按点击率
oo="click"
else
oo="newsid"
end if
if time="0" then '显示时间,0为不显示
tt=0
else
tt=1
end if
if click="0" then '显示点击数,0为不显示
cc=0
else
cc=1
end if
if title<>"" then '显示数目,不加为10
nn=title
else
nn=20
end if
if typeid<>"" then
set rs=conn.execute("SELECT top "&ss&" * FROM news where typeid="&typeid&" and checkked=1 order by "&oo&" desc")
else
if bigclassid<>"" then
set rs=conn.execute("SELECT top "&ss&" * FROM news where bigclassid="&bigclassid&" and checkked=1 order by "&oo&" desc")
else
if smallclassid<>"" then
set rs=conn.execute("SELECT top "&ss&" * FROM news where smallclassid="&smallclassid&" and checkked=1 order by "&oo&" desc")
else
if specialid<>"" then
set rs=conn.execute("SELECT top "&ss&" * FROM news where specialid="&specialid&" and checkked=1 order by "&oo&" desc")
else
set rs=conn.execute("SELECT top "&ss&" * FROM news where checkked=1 order by "&oo&" desc")
end if
end if
end if
end if
if rs.eof and rs.bof then %>
document.write('没有');
<% else
do while not rs.eof

title=trim(rs("title"))
title=replace(title,"<br>","")
if strcomp(gotTopic(title,nn),title)<0 then
%>
document.write('<LINK href=news.css rel=stylesheet><li><font class=class><A class=class href="<%=path%>ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=title%>" target="_blank"><%=gotTopic(title,nn)%></A><%if tt=1 then%><FONT color="#666666">(<%=month(rs("updatetime"))%>-<%=day(rs("updatetime"))%>)</FONT><%end if%><%if date()-rs("updatetime")<2 then%><FONT color="#ff0000">新!</FONT><%end if%><%if cc=1 then%><FONT color="#666666">(<%=rs("click")%>)</FONT><%end if%></font>');
<%else%>
document.write('<LINK href=news.css rel=stylesheet><li><font class=class><A class=class href="<%=path%>ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=title%>" target="_blank"><%=gotTopic(title,nn)%></A><%if tt=1 then%><FONT color="#666666">(<%=month(rs("updatetime"))%>-<%=day(rs("updatetime"))%>)</FONT><%end if%><%if date()-rs("updatetime")<2 then%><FONT color="#ff0000">新!</FONT><%end if%><%if cc=1 then%><FONT color="#666666">(<%=rs("click")%>)</FONT><%end if%></font>');
<%
end if
rs.movenext
loop
end if
Rs.Close
set Rs=nothing
%>
phckt 2004-09-02
  • 打赏
  • 举报
回复
首先要确定你news.asp输出的内容是否符合js规范嘛。
nbblkjj 2004-09-02
  • 打赏
  • 举报
回复
那要怎么写?为什么我以前这样写可以的,现在突然不行了,晕死了
weq221 2004-09-02
  • 打赏
  • 举报
回复
news.asp要用js输出
nbblkjj 2004-09-02
  • 打赏
  • 举报
回复
当然了
我现在要写一个asp文件,显示这个文件的时候,
其中一块内容就是news.asp?typeid=21&shu=7来显示的,要直接显示,不要点了在现实
weq221 2004-09-02
  • 打赏
  • 举报
回复
news.asp
betterwy 2004-09-02
  • 打赏
  • 举报
回复
<script src=news.asp?typeid=21&shu=7></script>
一般調用.js文件或.html文件這樣寫比較多
對,不會顯示,但執行
nbblkjj 2004-09-02
  • 打赏
  • 举报
回复
上面的方法都不行呀,有没有其他方法呀?
易点互联 2004-09-02
  • 打赏
  • 举报
回复
runat=server
ryuginka 2004-09-02
  • 打赏
  • 举报
回复
你那样不会显示,但是会执行的。就是会执行查询
nbblkjj 2004-09-02
  • 打赏
  • 举报
回复
不是吧?我以前行的,现在不知道为什么不行了?
每句话都写上是不可能的。
mjpclab 2004-09-02
  • 打赏
  • 举报
回复
那你得把news.asp输出得每句话都加上
document.write('xxxxxxxxxxxxxxx');
zltostem 2004-09-02
  • 打赏
  • 举报
回复
<iframe src=news.asp?typeid=21&shu=7>
...
mjpclab 2004-09-02
  • 打赏
  • 举报
回复
那就这样啦
<a href="news.asp?typeid=21&shu=7">...</a>
加载更多回复(3)

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧