zoukankan
html css js c++ java
jquery checkbox 选中 取消 checkbox多选框 控制显示隐藏[带演示]
演示地址:
http://www.corange.cn/demo/3798/index.html
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>jquery checkbox 选中 取消 checkbox多选框 控制显示隐藏</title>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load("jquery", "1.2.6");
</script>
</head>
<body>
<style type="text/css">
*{margin:0;margin:0;list-style-type:none;}
a,img{border:0;}
img{vertical-align:middle;}
label{cursor:pointer;}
address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:normal;font-weight:normal}
input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit}
input,button,textarea,select{*font-size:100%}
body{font:12px/180% Arial,"宋体";color:#333;}
.formbox{400px;border:solid 1px #ddd;padding:10px 20px 20px 20px;margin:0 auto;}
.findfive{height:20px;overflow:hidden;padding:5px 0 0 20px;}
/* findform */
#findform{padding:0 0 0 20px;}
#findform li .inputext{360px;height:20px;line-height:20px;padding:0 0 0 3px;background:url(images/inputbg.png) no-repeat;border:solid 1px #c6c6c6;}
#findform li .inputext input{border:none;font-family:Arial;background:none;97%;margin:3px 0 0 0;}
#findform li .grayinput{background:url(images/inputgraybg.png) no-repeat;}
</style>
<div class="formbox">
<div class="findfive"><input type="checkbox" name="" id="five" /> <label for="five">点击填写内容信息</label></div>
<ul id="findform" class="clearfix">
<li><span class="f-l">姓名:</span><div class="f-l inputext grayinput"><input type="text" name="" value="" id="" disabled="disabled" /></div></li>
<li><span class="f-l">性别:</span><div class="f-l inputext grayinput"><input type="text" name="" value="" id="" disabled="disabled" /></div></li>
<li><span class="f-l">电话(选填):</span><div class="f-l inputext grayinput"><input type="text" name="" value="" id="" disabled="disabled" /></div></li>
</ul>
</div><!--formbox end-->
<script type="text/javascript">
$(document).ready(function(){
$("#five").click(function(){
if($(this).attr("checked")){
$("#findform li input").removeAttr("disabled","");
$("#findform li .inputext").removeClass("grayinput");
}else{
$("#findform li input").attr("disabled","disabled");
$("#findform li .inputext").addClass("grayinput");
}
})
});
</script>
</body>
</html>
原文地址:
http://www.corange.cn/archives/2011/11/3798.html
查看全文
相关阅读:
桥接模式
单例模式
SpringAOP aspectJ ProceedingJoinPoint 获取当前方法
springMVC实现文件下载
JAVA的变量初始化类成员变量和局部变量区别
JAVA枚举类型的应用
linux下svn命令大全
转:shell脚本的一些注意事项
转: linux下不同服务器间数据传输(rcp,scp,rsync,ftp,sftp,lftp,wget,curl)
TCP三次握手/四次挥手详解
原文地址:https://www.cnblogs.com/zerogo/p/2249413.html
最新文章
2019杭电/牛客多校待补题和已补题
2019牛客第八场多校 E_Explorer 可撤销并查集(栈)+线段树
SPOJ_QTREE系列题解
2019牛客第八场多校 D_Distance 三维BIT或定期重建套路
HDU 6625 three arrays 求两个序列异或最小值的排列(一个可以推广的正解
左闭右开线段树 2019牛客多校(第七场)E_Find the median(点代表区间
Java设计模式之策略设计模式
Java设计模式之工厂设计模式
Java设计模式之职责链设计模式
Mysql索引介绍及常见索引的区别
热门文章
Mysql中where条件一个单引号引发的性能损耗
MySQL的Explain关键字查看是否使用索引
Java HttpClient伪造请求之简易封装满足HTTP以及HTTPS请求
利用mybatis-generator自动生成数据持久化的代码
IntelliJ IDEA 14.0.3 实战搭建Spring+SpringMVC+MyBatis组合框架
SpringMVC中使用Interceptor拦截器
Linux常用shell种类
Java标号与continue,break
SQL调优
软件设计模式概述
Copyright © 2011-2022 走看看