谁帮我纠正错误啊!谢谢!!!

cdsun 2002-05-10 04:15:23
一个页面程序
<%@ Page Language="VB" ContentType="text/html" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<p>血型</p>
<form method="post" runat="server">
<label>
<input id="atype" type="radio" name="blood" value="a" runat="server">
A <br>
<input id="btype" type="radio" name="blood" value="b" runat="server">
B <br>
<input id="otype" type="radio" name="blood" value="o" runat="server">
O <br>
<input id="abtype" type="radio" name="blood" value="ab" runat="server">
AB <br>
<input runat="server" type="submit" id="cmd01" value="提交" onsercerclick="cmd01_click"><br>

</form>
<p>  </p>
</body>
</html>
<script language="VB" runat="server">
sub cmd01_click(sender as object,e as eventargs)
dim strresult as string

strresult="您的血型是"

if atype.checked=true then
strresult=strresult & atype.value & "型"
else if btype.checked=true then
strresult=strresult & btype.value & "型"
else if otype.checked=true then
strresult=strresult & otype.value & "型"
else if abtype.checked=true then
strresult=strresult & abtype.value & "型"
end if
message.innerhtml="<font color='red'>"& strresult & "</font><br>"
end sub
</script>


出错信息如下!!!!!!!!!!
Server Error in '/' Application.
--------------------------------------------------------------------------------

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30451: Name 'message' is not declared.

Source Error:



Line 38: strresult=strresult & abtype.value & "型"
Line 39: end if
Line 40: message.innerhtml="<font color='red'>"& strresult & "</font><br>"
Line 41: end sub
Line 42: </script>


Source File: E:\iis50\aspnet\122.aspx Line: 40
...全文
14 点赞 收藏 2
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
cdsun 2002-05-21
谢谢你啊!

回复
GumPGZ 2002-05-10
不是提示你吗你的message没有声明,
如果你不知道怎么插入那么就直接使用label,

<SPAN ID="message" BEGIN="oSpan1.begin+3" TIMEACTION="display" CLASS="time" DUR="4">
A Fast and Simple way to add visual transitions to your media elements.
</SPAN>
回复
相关推荐
发帖
.NET技术社区
创建于2007-09-28

5.8w+

社区成员

.NET技术交流专区
申请成为版主
帖子事件
创建了帖子
2002-05-10 04:15
社区公告
暂无公告