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>
相關(guān)文章
- ASP.NET Web Pages – 發(fā)布
- ASP.NET Web Pages WebMail 參考手冊
- ASP.NET Razor C# 循環(huán)和數(shù)組
- ASP.NET MVC 簡介
- ASP.NET MVC 數(shù)據(jù)庫
- ASP.NET MVC 安全
- ASP.NET 服務(wù)器控件
- 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 方法