Jquery-选择框点击勾选或者取消

1:单选框,直接定位到属性名称

$(document).ready(function(){
    var old = null; //用来保存原来的对象
    $("input[name=‘sex‘]").each(function(){//循环绑定事件
        if(this.checked){
            this.checked= false;
        }else{
            this.checked = true;
        }
    });
});  

2.根据iD

function select_input(hid){
    jQuery("#"+hid).each(function(){//循环绑定事件
            if(this.checked){
                this.checked = false;
            }else{
                this.checked = true;
            }
        });
}
时间: 2024-12-23 19:01:46

Jquery-选择框点击勾选或者取消的相关文章

dev 表格添加复选框 ,可以勾选多行

this.repositoryItemCheckEdit1.QueryCheckStateByValue += new DevExpress.XtraEditors.Controls.QueryCheckStateByValueEventHandler(re3_QueryCheckStateByValue); //判断表格的数据勾选复选框 void re3_QueryCheckStateByValue(object sender, DevExpress.XtraEditors.Controls.

jquery选择框属性prop()方法

$("checkAll").click(function(){ if($("#checkAll").is(":checked")){ $("[name = items]:checkbox").attr("checked",true);  }else{   $("[name = items]:checkbox").attr("checked",false); } });

如何在word插入一个可以勾选和取消的方框

1.点击插入选项.在其菜单栏中找到符号选项,点击它.如图. 选择wingdings 或者"wingdings 2",在下面找到R,并选择:点击确定. 原文地址:https://www.cnblogs.com/springsnow/p/12291647.html

jQuery 选择框 Selectator

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ page import="com.ule.web.util.Constants"%> <%@ page import="com.ule.framework.common.ItemConstants"%> <!DOCTYPE html PUBLIC &q

[英] 推荐 15 个 jQuery 选择框插件

jQuery Selectbox Plugins let you create beautiful and eye catching select box for your websites instead of the orthodox html select box which looks old and boring. This gallery includes 15 jQuery SelectBox Plugins which can be used to enhance any web

element ui table单选框点击全选问题

<template slot-scope="scope"> <el-radio-group v-model="scope.row.HandleState" size="small"> <el-radio :label="0" @change="operation(scope.row, RepairOrChangeListTwo[0].value,scope.row.ID)"&g

ExtJs实现复选框组Checkboxgroup单勾选及复选框组对多个复选框组跨控件全选

ExtJs实现复选框Checkboxgroup单勾选及跨控件全选 由于项目的需要,我们要将EXT的控件Checkboxgroup复选框组改造成但勾选,并且实现一个复选框组控制其他多个复选框组的全选,以下是关于如何实现的代码片段. 1.创建CheckboxGroup对象 1,新建空的EOS6.5的工程,新建com.towngas.tcis. gridlock构件包: 2,在com.towngas.tcis.gridlock构件包的"展现"节点下的"页面资源"节点中创建

TERSUS画画一样开发软件 显示元件介绍-勾选类显示元件

TERSUS无代码手机电脑管理类软件开发,其中可拖放使用的勾选类显示元件包括:勾选框元件(Check Box).带标签勾选框元件(Check Box with label).放射效果多选项按钮元件(Radio Button Group).放射效果单项勾选元件(Radio Button) 勾选框元件(Check Box):勾选框元件是用户在电脑或手机上可以打勾选处理的元件,当前端打勾时,其中的值变为布尔常量"是",可以用于后面逻辑的判断等,比如如果勾选则进行什么逻辑处理等. 1.勾选框的

案例:点餐选择框

效果图(上传失败了,后续会补充): 代码: <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <style> * { margin: 0; padding: 0; } table { border-collapse: collapse; border: 1px solid #c