求救!asp高手进!

来源:百度知道 编辑:UC知道 时间:2024/06/29 22:42:13
请各位高手帮本人解释一下如下的asp代码吧,对response.write""中的""里面的格式有点不太了解.例如response.write "<img src=""/" & graphic & """",""/"是什么意思呀?""""又是什么意思呀?对这些格式有点混乱.请给予指点吧.

<%
graphic="images/intels.gif"
HW = ReadImg(graphic)
Response.Write graphic & " Dimensions: " & HW(0) & "x" & HW(1)
& "<br>"
response.write "<img src=""/" & graphic & """"
response.write height=""" & HW(0) & """
response.write width=""" & HW(0) & "">"
%>

""其实就是显示"
只不过"作为字符串引用符,要显示输出的话就要""
"&就是显示&

比如"""" 其实就是"" 即一个空的字串.

<%
graphic="images/intels.gif" '图象路径定义为graphic
HW = ReadImg(graphic) 'HW被赋值读取图象
Response.Write graphic & " Dimensions: " & HW(0) & "x" & HW(1)
& "<br>" ’写出图象的长和宽 Dimensions:动态尺寸吧
response.write "<img src=""/" & graphic & """" ’写出显示图象的语句
response.write height=""" & HW(0) & """ ’写出显示图象的高
response.write width=""" & HW(1) & "">" ’写出显示图象的宽
%>
" <img src=" "/ " & graphic & " " " " ’四组括号 从中间开始共4组括号 如同(<img src=((/(& graphic &))))但ASP必须用 " 符号