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
查看全文
相关阅读:
【整理】close 和 shutdown 的原理
【理解】 Error 10053和 Error 10054
【转载】 socket recv 和 read
【转载】socket 的 connect、listen、accept 和全连接队列、半连接队列的原理
【原创】MySQL 生产环境备份还原
【原创】【问题记录】系统管理员设置了系统策略,禁止此安装的最终解决办法
【原创】rabbitmq 学习
mvc, web mvc, spring web mvc 区别
Spring 读取配置文件的俩种方式
移动端web开发技巧和常见问题
原文地址:https://www.cnblogs.com/zerogo/p/2249413.html
最新文章
基础学习总结(八)--Intent中显示意图和隐式意图的用法
linux 下python升级至最新版本
python使用list( )时总是报错
vim编辑器快捷操作
执行mysql语句报错 Illegal mix of collations……
linux 下升级nginx
linux下开启和禁用不同端口
了解selinux 及其开启和关闭的方法
php连接redis报错
smarty标签冲突js
热门文章
【数学】mex是什么
【C++程序不输出】到底是什么造成了程序不输出
【Geforce】关于如何在Geforce Experience中登录
【NOIP2018】为什么这么无力啊
【模版】水题专用模版。
【Ubuntu】基本操作 (条目=11)
【数据结构】链式向前星知识点&代码
【最短路算法】Dijkstra知识点&代码
【字符串处理】AC自动机知识点&代码
【问题记录】centos 开机启动命令未执行
Copyright © 2011-2022 走看看