首页 > Web开发 > 详细

input jquery 操作

时间:2014-11-19 17:40:54      阅读:318      评论:0      收藏:0      [点我收藏+]

本文章主要为了总结开发常用的input等常见html的jquery操作,不是为了展示自己多么菜,只为了积累知识,勿喷!!!不断更新中

bubuko.com,布布扣
$(function () {
            $("input[name=T]").eq(0).attr("checked", "checked"); //默认第一个选中
            $("input[name=T]").each(function () {

                $(this).click(function () {
                    $("input[name=T]").removeAttr("checked"); //不被选中的清除checked属性
                   $(this).attr("checked", "checked"); 
                }); 
               
       });

获得 选中的val

 $(“input[name=T][checked]").val();
Radio

 

input jquery 操作

原文:http://www.cnblogs.com/DDSkay/p/4108598.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!