본문 바로가기

asp

[asp] 결과를 출력해주는 출력문 (response.write)

문자열 출력

<html>
<body>
<%
response.write("happycode")
%>
</body>
</html>

 

문자열과 변수 출력

<html>
<body>
<%
dim i
i = 77

response.write("happycode" & i)
%>
</body>
</html>

 

 

출력할 문자열에 쌍따옴표가 포함되어 있을때

 

쌍따옴표를 그 앞에 한번 더 써주면 쌍따옴표가 정상적으로 출력된다.

<%
Response.Write "happy""code!"""
%>

결과는 happy"code!" 가 출력됨.