HTML InputRadiobutton
asp.net html 控件
html inputradiobutton
<script runat="server">
sub submit(source as object, e as eventargs)
if r1.checked=true then
p1.innerhtml="your favorite color is red"
else
if r2.checked=true then
p1.innerhtml="your favorite color is green"
else
if r3.checked=true then
p1.innerhtml="your favorite color is blue"
end if
end if
end if
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
<p>select your favorite color:
<br>
<input id="r1" name="col" type="radio" runat="server">red</input>
<br>
<input id="r2" name="col" type="radio" runat="server">green</input>
<br>
<input id="r3" name="col" type="radio" runat="server">blue</input>
<br>
<input type="button" value="submit" onserverclick="submit" runat="server"/>
<p id="p1" runat="server" />
</form>
</body>
</html>
sub submit(source as object, e as eventargs)
if r1.checked=true then
p1.innerhtml="your favorite color is red"
else
if r2.checked=true then
p1.innerhtml="your favorite color is green"
else
if r3.checked=true then
p1.innerhtml="your favorite color is blue"
end if
end if
end if
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
<p>select your favorite color:
<br>
<input id="r1" name="col" type="radio" runat="server">red</input>
<br>
<input id="r2" name="col" type="radio" runat="server">green</input>
<br>
<input id="r3" name="col" type="radio" runat="server">blue</input>
<br>
<input type="button" value="submit" onserverclick="submit" runat="server"/>
<p id="p1" runat="server" />
</form>
</body>
</html>
相关文章
- ASP.NET Web Pages – 发布
- ASP.NET Web Pages WebMail 参考手册
- ASP.NET Razor C# 循环和数组
- ASP.NET MVC 简介
- ASP.NET MVC 数据库
- ASP.NET MVC 安全
- ASP.NET 服务器控件
- ASP.NET SortedList
- ASP.NET RegularExpressionValidator 控件
- ASP.NET AdRotator 控件
- ASP.NET Calendar 控件
- ASP.NET LinkButton 控件
- ASP.NET Literal 控件
- ASP.NET PlaceHolder 控件
- ASP.NET TableCell 控件
- ASP.NET XML 控件
- WebSecurity IsAuthenticated 属性
- WebSecurity ConfirmAccount 方法
- WebSecurity Login 方法
- WebSecurity RequireRoles 方法