请大家帮看看这段代码有什么错误

来源:百度知道 编辑:UC知道 时间:2024/05/16 03:19:39
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>风景画 </title>
</head>
<body bgcolor="#000000">
<%
if request.Cookies("userlogin")=user_session then
<script> window.alert('欢迎你,"&username&"!您是"&usertype&"')</script>
<table width="700" border="0" align="center">
<tr>

修改成下面这样。
if request.Cookies("userlogin")=user_session then
后面加个%>
else前面加<%

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>风景画 </title>
</head>
<body bgcolor="#000000">
<%
if request.Cookies("userlogin")=user_session then %>
<script> window.alert('欢迎你,"&username&"!您是"&usertype&"