jQuery – :reset Selector

The jQuery reset selector selects all elements of type reset. jQuery(‘:reset ‘) is equivalent to jQuery(‘[type=reset ]’) or jQuery(‘input:reset ‘)

Source Code

<!DOCTYPE html>
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<div class="div1">
<label>Reset Button : </label><input type="reset" />
</div>
<button>Click Here</button>

  
<script>
jQuery("button").click(function () {
	jQuery("div.div1 > :reset").css({border:"3px #1E8CBE solid"});
});
</script>
</body>
</html>

Demo

Following example finds all reset inputs and create a border.

,

No comments yet.

Leave a Reply