jQuery MiniUI

 找回密码
 立即注册
查看: 4651|回复: 1
打印 上一主题 下一主题

miniui获取对象 [复制链接]

Rank: 1

跳转到指定楼层
楼主
发表于 2012-7-31 16:51:12 |只看该作者 |倒序浏览
<table id='shenyy'>
<tr><td nowrap='nowrap'>    <label for='prop_'1627207>颜色分类</label></td><td>    <div name='cp_1627207' onvaluechanged='colorList' class='mini-checkboxlist'    repeatItems='3' valuechanged='colorList()' repeatLayout='flow' data='[{"id":"1627207:3232483","text":"军绿色"},{"id":"1627207:3232484","text":"天蓝色"},{"id":"1627207:3232481","text":"巧克力色"},{"id":"1627207:90554","text":"桔色"},{"id":"1627207:28332","text":"浅灰色"},{"id":"1627207:30156","text":"浅绿色"},{"id":"1627207:60092","text":"浅黄色"},{"id":"1627207:3232482","text":"深卡其布色"},{"id":"1627207:3232478","text":"深灰色"},{"id":"1627207:3232479","text":"深紫色"},{"id":"1627207:28340","text":"深蓝色"},{"id":"1627207:28320","text":"白色"},{"id":"1627207:3232480","text":"粉红色"},{"id":"1627207:80882","text":"紫罗兰"},{"id":"1627207:28329","text":"紫色"},{"id":"1627207:28326","text":"红色"},{"id":"1627207:28335","text":"绿色"},{"id":"1627207:130164","text":"花色 "},{"id":"1627207:28338","text":"蓝色"},{"id":"1627207:132069","text":"褐色"},{"id":"1627207:107121","text":"透明"},{"id":"1627207:28327","text":"酒红色"},{"id":"1627207:28324","text":"黄色"},{"id":"1627207:28341","text":"黑色"}]' textField='text' valueField='id'></div></td></tr></table>


<script language="javascript">
mini.parse();
    var form = new mini.Form("#shenyy");

    function colorList(e){
alert(e.value); //获取点击的值
        alert(e.checked);//这样不行?????? 我想获取 它本身是否 选中了checked
$(e).parents('tr').find('label').eq(0).html()//我在想 怎么获取点击对象的上级 在找到 第一个TD 下的Html 内容??
    }
</script>   
求解 谢谢

Rank: 9Rank: 9Rank: 9

沙发
发表于 2012-7-31 17:30:15 |只看该作者
你如果用jquery的处理方式,建议你自己生成多个checkbox,还简单一些。

Archiver|普加软件

GMT+8, 2024-11-26 04:35 , Processed in 1.023900 second(s), 10 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部