ASP.NET HTML 控件 Checkbox
asp.net html 控件 checkbox
<script runat="server">
sub check(sender as object, e as eventargs)
if check1.checked then
work.text=home.text
else
work.text=""
end if
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
<p>home phone:
<asp:textbox id="home" runat="server" />
<br>
work phone:
<asp:textbox id="work" runat="server" />
<asp:checkbox id="check1"
text="same as home phone" textalign="right"
autopostback="true" oncheckedchanged="check"
runat="server" />
</p>
</form>
</body>
</html>
sub check(sender as object, e as eventargs)
if check1.checked then
work.text=home.text
else
work.text=""
end if
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
<p>home phone:
<asp:textbox id="home" runat="server" />
<br>
work phone:
<asp:textbox id="work" runat="server" />
<asp:checkbox id="check1"
text="same as home phone" textalign="right"
autopostback="true" oncheckedchanged="check"
runat="server" />
</p>
</form>
</body>
</html>
相关文章
- ASP.NET Web Pages 全局文件
- ASP.NET Web Pages HTML 表单
- ASP.NET Razor 语法
- ASP.NET Razor C# 循环和数组
- ASP.NET Razor VB 逻辑
- ASP.NET MVC 数据库
- ASP.NET MVC 参考手册
- ASP.NET Web Forms 教程
- ASP.NET ArrayList
- ASP.NET SortedList
- ASP.NET DataList 控件
- ASP.NET 母版页
- ASP.NET CheckBox 控件
- ASP.NET HyperLink 控件
- ASP.NET ImageButton 控件
- ASP.NET LinkButton 控件
- ASP.NET PlaceHolder 控件
- ASP.NET TableRow 控件
- WebSecurity CurrentUserName 属性
- HTML Inputbutton