返回jquery表......登陆

jquery表单选择器

文昌2018-12-16 22:49:01242
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>jquery表单选择器</title>
		<script src="jquery/jquery-3.3.1.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			/* div{width: 100px;height: 100px;background: #ccc;margin-top: 20px;} */
		</style>
	</head>
	<body>
		<script type="text/javascript">
			$(document).ready(function(){
// 				$(':enabled').css('background','pink')
// 				$(':disabled').css('background','red')
				// $(':selected').css('color','blue')
				$(':checked').parent().css('color','red')
			})
		</script>
		<form>
			<lable>1</lable><input type="text" name="" /><br>
			<lable>2</lable><input type="text" name="" /><br>
			<lable>3</lable><input type="text" name="" disabled /><br>
			<lable>4</lable><input type="text" name="" /><br>
			<select name="" id="">
				<option value ="">摩羯座</option>
				<option selected>双鱼座</option>
				<option value ="">射手座</option>
				<option value ="">天蝎座</option>
			</select>
			<br>
			爱好
			<lable><input type="checkbox" name="" />看书</lable>
			<lable><input type="checkbox" name="" checked/>游戏</lable>
			<lable><input type="checkbox" name="" />游泳</lable>
		</form>
	</body>
</html>


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送