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
查看全文
相关阅读:
微软不也是从Altair Basic这丑小鸭长成白天鹅吗?
互联网创业应该如何找到创意
互联网创业创意养成记1
安卓CTS官方文档之兼容性方案概览
跨平台移动应用开发是否真的是一个好选择?
Ubuntu安装MyEclise16 过程差不多
Ubantu下安装jdk 教程
最近出错总结
使用Eclipse编译运行MapReduce程序 Hadoop2.6.0_Ubuntu/CentOS
关于最近学习出现的错误,及解决的想法
原文地址:https://www.cnblogs.com/zerogo/p/2249413.html
最新文章
Django框架(二十一)—— Django rest_framework-权限组件
Django框架(二十)—— Django rest_framework-认证组件
Django框架(十九)—— drf:序列化组件(serializer)
黄金与指数的关联性研究的观点一标普-道-黄金20分钟延迟
美国私募基金规范的发展及其启示 *
阳光私募基金的投资者保护研究
大师投资法则整理
财经投资简报 2014 -1-27
html5和c++开源 K线图工具
男人给女人讲的金融知识————金融就是买包包
热门文章
成为一名专业“宽客”的精髓
美国ADP就业数据是什么?与非农有何关系
股票、黄金、期货、美元、石油涨跌关系
poj 1236 Network of Schools
hdu 1269 迷宫城堡
第1章3节《MonkeyRunner源码剖析》概述:架构(原创)
第1章2节《MonkeyRunner源码剖析》概述:边界(原创)
第1章1节《MonkeyRunner源码剖析》概述:前言(原创)
RethinkDB创始人教你如何打造一个伟大的互联网产品
UIAutomator源码分析之启动和运行
Copyright © 2011-2022 走看看