用response输出html语句的问题!!!!

shenzhe 2001-04-12 08:49:00
加精
我想输出如下语句
Response.write('<img src="showimg.asp?id=" '& ids & '">')
ids为变量
以实现<img src="showimg.asp?id=XXX">
结果用浏览器只看到一个0
后来我又试了
Response.write("<font size=2 color="& color &">this is a test</font>")
结果也是0不知为什么_-_!
...全文
178 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
shenzhe 2001-04-19
  • 打赏
  • 举报
回复
搞定了是用
<img src=showimg.asp?id=<%= ids %> >
呵呵!
shenzhe 2001-04-12
  • 打赏
  • 举报
回复
改成如下才不报错
Response.write ("<img src="&"showimg.asp?id="& ids & ""&">")
但结果还是0-_-~~~~~~~
shenzhe 2001-04-12
  • 打赏
  • 举报
回复
Microsoft JScript 编译错误 错误 '800a03ec'
提示出错
缺少 ';'

/display.asp, 行22

Response.write "<img src=""showimg.asp?id="& ids & """>"
---------------^
shenzhe 2001-04-12
  • 打赏
  • 举报
回复
Microsoft JScript 编译错误 错误 '800a03ec'
提示出错
缺少 ';'

/display.asp, 行22

Response.write "<img src=""showimg.asp?id="& ids & """>";

tripofdream 2001-04-12
  • 打赏
  • 举报
回复
Response.write "<img src=showimg.asp?id='"& ids & "'>"
如果ids是數值型的,這樣就行了:
Response.write "<img src=showimg.asp?id="& ids & ">";
如果要輸出雙引號
Response.write "<img src=""showimg.asp?id="& ids & """>"

28,406

社区成员

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

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