ASP.NET HTML 控件 Radiobutton
asp.net html 控件 radiobutton
<script runat="server">
sub submit(sender as object, e as eventargs)
if red.checked then
label1.text="you selected " & red.text
elseif green.checked then
label1.text="you selected " & green.text
elseif blue.checked then
label1.text="you selected " & blue.text
end if
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
select your favorite color:
<br>
<asp:radiobutton id="red" text="red" checked="true"
groupname="colors" runat="server"/>
<br>
<asp:radiobutton id="green" text="green"
groupname="colors" runat="server"/>
<br>
<asp:radiobutton id="blue" text="blue"
groupname="colors" runat="server"/>
<br>
<asp:button text="submit" onclick="submit" runat="server"/>
<p><asp:label id="label1" runat="server"/></p>
</form>
</body>
</html>
sub submit(sender as object, e as eventargs)
if red.checked then
label1.text="you selected " & red.text
elseif green.checked then
label1.text="you selected " & green.text
elseif blue.checked then
label1.text="you selected " & blue.text
end if
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
select your favorite color:
<br>
<asp:radiobutton id="red" text="red" checked="true"
groupname="colors" runat="server"/>
<br>
<asp:radiobutton id="green" text="green"
groupname="colors" runat="server"/>
<br>
<asp:radiobutton id="blue" text="blue"
groupname="colors" runat="server"/>
<br>
<asp:button text="submit" onclick="submit" runat="server"/>
<p><asp:label id="label1" runat="server"/></p>
</form>
</body>
</html>
相关文章
- ASP.NET 教程
- ASP.NET Web Pages 布局
- ASP.NET Web Pages 全局文件
- ASP.NET Web Pages HTML 表单
- ASP.NET Web Pages 对象
- ASP.NET Web Pages PHP
- ASP.NET Razor 语法
- ASP.NET Razor C# 逻辑
- ASP.NET MVC 页面和布局
- ASP.NET MVC 安全
- ASP.NET 服务器控件
- ASP.NET 数据库连接
- ASP.NET DropDownList 控件
- ASP.NET HyperLink 控件
- WebSecurity GetCreateDate 方法
- HTML InputHidden
- HTML InputImage
- HTML Textarea
- AdRotator
- ASP.NET HTML 控件 Calendar 2