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

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
...全文
49 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
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>

62,244

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧