- 注册时间
- 2014-3-6
- 最后登录
- 2024-6-14
- 阅读权限
- 10
- 积分
- 554
- 精华
- 0
- 帖子
- 18
|
在表单中 用form.getData取不到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>
- <title>CheckBoxList</title>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" /><link href="../demo.css" rel="stylesheet" type="text/css" />
-
- <script src="../../scripts/boot.js" type="text/javascript"></script>
-
-
- </head>
- <body>
- <h1>CheckBoxList 复选框组</h1>
- <div id="editform" class="form" >
- <div id="cbl1" class="mini-checkboxlist" repeatItems="3" repeatLayout="table"
- textField="text" valueField="id" value="cn,usa"
- url="../data/countrys.txt" >
- </div>
- <input type="button" value="getValue" onclick="getValue()"/>
- </div>
- <script type="text/javascript">
- function getValue() {
- var form = new mini.Form("#editform");
- var o = form.getData();
- var json = mini.encode([o]);
- alert(json);
- }
-
- </script>
- </body>
- </html>
复制代码
|
|