请火速支援兄弟!!!

xp624216 2003-10-15 04:35:04
<%
for i=1 to 5
response.write"<font size="&i&">hello,world</font><br>"
next
%>
请问上面size="&i&"中&的含意,因为过去学的c语言,对vbscript还不太熟悉。还有<br>如果写在response.write“”的外面就会有错误,如:
response.write"<font size="&i&">hello,world</font>"
<br>
问题比较简单,请各位赐教!!!
...全文
56 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiejunhua 2003-10-15
  • 打赏
  • 举报
回复
response.write 就是输出的意思了.
size="&i&" 是一个变量在response.write 里的书写格式.
chnj1981 2003-10-15
  • 打赏
  • 举报
回复
response.write"<font size=<%i%>>"
response.write"hello,world!"
response.write"</font>"
dxwwym 2003-10-15
  • 打赏
  • 举报
回复
I从上面的语句来看是1到5中的一个数
&是一个连接字符用来连接I两边的字符向服务器输出完整语句
<br>是一个换行的标记
换行标记是要从服务器输出到客户端的所以要加引号否则服务器不能识别

wubaozhang 2003-10-15
  • 打赏
  • 举报
回复
<%
for i=1 to 5
response.write"<font size="&i&">hello,world</font>"
%>
<br>
<%
next
%>

初学者应注意区分客户端和服务端代码的区别
hozi 2003-10-15
  • 打赏
  • 举报
回复
response.write"<font size=" & i & ">hello,world</font><br>"
这里&是连接符,这句话的意思是说先输出字符串 "<font size=",再输出变量i,如果i=10的话,就输出10,然后再输出字符串 ">hello,world</font><br>",这样生成的html代码如下:<font size=10>hello,world</font><br>
<% %>里面放的是vbscript脚本,你把<br>放到response.write ""外面就会有语法错误,因为它不是vbscript脚本。明白?
xp624216 2003-10-15
  • 打赏
  • 举报
回复
谢谢
aryou 2003-10-15
  • 打赏
  • 举报
回复
"a" & "b"

结果

"ab"
xp624216 2003-10-15
  • 打赏
  • 举报
回复
response.write"<font size="&i&">hello,world</font>"
<br>
<br>放在外面老是出错,还有就是语句中,&是什么含意?
1蓝天1 2003-10-15
  • 打赏
  • 举报
回复
&是与的意思;<br>是html语言,如放在外面就是放在了vbscript中了,所以会出错
oceanlove 2003-10-15
  • 打赏
  • 举报
回复
response.write"<font size="&i&">hello,world</font><br>"
或者response.write"<font size="&i&">hello,world</font>"%>
<br><%
lihua9666 2003-10-15
  • 打赏
  • 举报
回复
字体大小
chnj1981 2003-10-15
  • 打赏
  • 举报
回复
response.write"<font size="<%i%>">hello,world</font>"

28,391

社区成员

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

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