为什么没法编译这段代码?

来源:百度知道 编辑:UC知道 时间:2024/05/31 21:02:19
< html>
< head>
< TITLE>ifrespond.asp< /TITLE>
< /head>
< % fname=request.querystring("Firstname")
lname=request.querystring("Lastname")
If fname="George" and lname="Washington" then %>
Hi.You must be the first president!
< % else %>
Hi!Nice to Meet You
< %end if %>
< /body>
< /html>

========================================================
打开后是空白页面!

这样写
<html>
<head>
<TITLE>ifrespond.asp< /TITLE>
</head>
<%
fname=request.querystring("Firstname")
lname=request.querystring("Lastname")
If fname="George" and lname="Washington" then
%>
Hi.You must be the first president!
< % else %>
Hi!Nice to Meet You
< %end if %>
</body>
</html>

<html>
<head>
<TITLE>ifrespond.asp</TITLE>
</head>
<body>
<% fname=request.querystring("Firstname")
lname=request.querystring("Lastname")
If fname="George" and lname="Washington" then %>
Hi.You must be the first president!
<%else%>

Hi!Nice to Meet You
<% end if%>
</body>
</Html>

多了一些莫名其妙的空格,编译器不识别了``手写一遍OK

没有<body&g