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
查看全文
相关阅读:
PS图层中如何快速找到想要的图层
知识点手记二
IE6兼容
Hack、自适应、针对浏览器写样式随手笔记
汇编语言实验三
汇编语言实验二
汇编语言实验一
寄存器与代码段
java.nio.Buffer源码阅读
汇编语言初探
原文地址:https://www.cnblogs.com/zerogo/p/2249413.html
最新文章
【MM】采购订单价格与底层表里不一样
【ABAP BAPI】如何通过事务代码查找对应的BAPI(转)
【MM】估价收货和非估价收货
【MM】分割评估
Django中admin样式定制
ORM的惰性机制
Django中ORM的聚合索引
flask处理csrf攻击
flask中cookie和session的使用
flask数据库基本操作
热门文章
Python——初识面向对象
Python——字典与字符
Python——函数进阶
Python——运算符
安卓手机输入法盖住输入框问题
手机端页面自适应解决方案—rem布局
事件委托
一张图轻松搞懂javascript event对象的clientX,offsetX,screenX,pageX区别
IE6不支持fixed
针对谷歌、火狐浏览器写私有属性
Copyright © 2011-2022 走看看