<!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>
<title>表单选择器</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<style type="text/css">
.yang{ border-collapse: collapse; width:500px;height:30px;border:1px solid red;"}
</style>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript">
/*
:input // :input匹配表单中所有元素,包括select、textarea ; input表示匹配input标签。
:text //匹配
:password
:radio
:checkbox
:submit
:reset
:image
:button
:file
:hidden
*/
window.onload=function(){
$('#btnOk').click(function(){
//隐藏所有的表单
$(':input').hide();
});
};
</script>
</head>
<body>
<input type='text' />
<hr/>
<input type='password' />
<hr/>
<input type='file' />
<hr/>
<select></select>
<text></text>
<input type="button" id='btnOk' value='确定' />
</body>
</html>
更多专业前端知识,请上 【猿2048】www.mk2048.com