jquery reset选择器 语法

jquery reset选择器 语法

作用::reset 选择器选取类型为 reset 的 <button> 和 <input> 元素。
直线电机滑台

语法:$(":reset"

注释:通过该选择器使用 input:reset 不会选择 <button> 元素。

jquery reset选择器 示例

<html>
<head>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript"> 
 
$(document).ready(function(){
    $(":reset").css("background-color","#B2E0FF");
}); 
</script>	
</head>
<body>
<html>
<body>
<form action="">
Name: <input type="text" name="user" />
<br />
Password: <input type="password" name="password" />
<br />
<button type="button">Useless Button</button>
<input type="button" value="Another useless button" />
<br />
<input type="reset" value="Reset" />
<input type="submit" value="Submit" />
<br />
<button type="reset">Reset Button</button>
<br />
</form>
</body>
</html>
</body>
</html>
原文地址:https://www.cnblogs.com/furuihua/p/11978174.html