asp.net中checkboxlist和radiobuttonlist
来源:互联网 发布:mac好用还是windows 编辑:程序博客网 时间:2024/05/04 12:55
.aspx代码如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadoButtonList和CheckBoxList.aspx.cs" Inherits="RadoButtonList和CheckBoxList" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script> <title></title> </head><body> <form id="form1" runat="server"> <div> <span id="errmsg"></span> <asp:checkboxlist ID="Checkboxlist1" runat="server"> <asp:ListItem>1</asp:ListItem> <asp:ListItem>2</asp:ListItem> <asp:ListItem>3</asp:ListItem> </asp:checkboxlist> <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="return emptycheck()" /> <script type="text/javascript"> function emptycheck() { var _s = $(":checked","#checkboxlist").val(); if (_s == null) { $("#errmsg").text("至少选中一项"); return false; } else{ $("#errmsg").text(""); return true; } } </script> </div> </form></body></html>
效果如下:
0 0
- asp.net中checkboxlist和radiobuttonlist
- Asp.net js获取CheckBoxlist 和 Radiobuttonlist
- asp.net中repeater嵌套CheckBoxList,RadioButtonList来完成投票
- asp.net中repeater嵌套CheckBoxList,RadioButtonList来完成投票
- asp.net中repeater嵌套CheckBoxList,RadioButtonList来完成投票
- asp.net中repeater嵌套CheckBoxList,RadioButtonList来完成投票
- asp.net中repeater嵌套CheckBoxList,RadioButtonList来完成投票
- asp.net中repeater嵌套CheckBoxList,RadioButtonList来完成投票
- [我的ASP.net学习历程]CheckBoxList和RadioButtonList的数据梆定
- ASP.Net: 为 CheckBoxList 和 RadioButtonList 中的各 ListItem 项目编写客户端脚本
- ASP.NET 2.0中的友好CSS控件适配器的应用 - 用ul、li呈现CheckBoxList和RadioButtonList
- ASP.NET 中 RadioButtonList的实例
- 分享ASP.NET视频系列教程——第七讲 CheckBox,CheckBoxList,RadioButton,RadioButtonList控件
- ASP.NET服务器端控件RadioButtonList,DropDownList,CheckBoxList的取值、赋值用法
- repeater中CheckBoxList/RadioButtonList取值赋值
- js控制radiobuttonlist和checkboxlist选项
- RadioButtonList和CheckBoxList的JS操作
- CheckBoxList和RadioButtonList控件的绑定
- IE7,8,9兼容性处理
- Core Text 入门
- JAVA闭包
- R语言中有关包的操作
- R通过RJDBC连接外部数据库
- asp.net中checkboxlist和radiobuttonlist
- 开始学习hadoop 一些概念糊涂了吧
- Style
- jni笔记2
- Linux SDIO
- SGU 110 计算几何
- 复选框单选框与文字对齐问题的研究与解决
- unity3D介绍
- 菜鸟程序员的心路历程