当前位置:网站首页>Radio boxes are mutually exclusive and can be deselected at the same time
Radio boxes are mutually exclusive and can be deselected at the same time
2022-06-26 01:09:00 【Jennifer33K】
Radio boxes are mutually exclusive and can be unchecked at the same time
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="/js/js/jquery.min.js"></script>
</head>
<body>
<div id="box2" class="box"> New energy vehicle or not :
<input type="radio" id="isNewEngery" name="isNewEngery" > yes
<input type="radio" id="notNewEngery" name="isNewEngery"> no
<!-- <input type="checkbox" id="isNewEngery" name="isNewEngery"> yes -->
<!-- <input type="checkbox" id="notNewEngery" name="notNewEngery"> no -->
</div>
<script>
$(document).ready(function () {
$(':radio').click(function () {
var r = $(this).attr("name");
$(":radio[name=" + r + "]:not(:checked)").attr("tag", 0);
if ($(this).attr("tag") == 1) {
$(this).prop('checked',false);
$(this).attr("tag", 0);
}else {
$(this).attr("tag",1);
}
});
});
</script>
</body>
</html>
边栏推荐
- Summary of push-pull output and open drain output of STM32 and failure of analog IIC driving mlx90615
- [机缘参悟-30]:鬼谷子-内揵篇-同理心,站在对方的立场,拉近与对方的心理距离
- Mpu6050 reads the ID incorrectly and 0xd1 occurs (the correct ID should be 0x68 or 0x69). Solution.
- . Net using access 2010 database
- WIN10系统C盘清理策略
- PHP performance optimization
- C IO stream (II) extension class_ Packer
- The maze of God's perspective in robot vision
- WordPress
- 关于EF翻页查询数据库
猜你喜欢

JS reverse case: cracking login password

STL tutorial 5-basic concepts of STL and the use of string and vector

Template engine - FreeMarker first experience

返回值为Object型方法调用equals()

LabVIEW开发监控聚变实验脉冲电源

Establish a j-link GDB cross debugging environment for Px4

新库上线 | CnOpenData中国新房信息数据

Installation and startup of redis

Optimized three-dimensional space positioning method and its fast implementation in C language

下载安装Flume
随机推荐
Login interceptor
Data synchronization
Blob
Post ordered clue binary tree
Optimized three-dimensional space positioning method and its fast implementation in C language
案例:绘制Matplotlib动态图
Web學習之TypeScript
Classic interview questions: mouse drug test and Hamming code
Typescript for Web Learning
Preorder and middle order traversal of forest
制作3D浪漫炫酷相册【附源码】
Analyze the five root causes of product development failure
马斯克 VS 乔布斯,谁是21世纪最伟大的创业家
ASP. Net cache cache usage
Ad20 (Altium designer) PCB highlight network
The maze of God's perspective in robot vision
Mpu6050 reads the ID incorrectly and 0xd1 occurs (the correct ID should be 0x68 or 0x69). Solution.
ETCD数据库源码分析——集群间网络层服务端接口
C#使用MySql进行操作
继承--圣杯模式