Home >>jQuery Tutorial >jQuery button Selector

jQuery button Selector

jQuery button Selector

jQuery button selector in jQuery is used to selects button elements, and input elements with type=button.

Here is an Example of jQuery :button Selector

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(":button").css("background-color", "#c0ed1f");
});
</script>
</head>
<body>
<form action="">
Name: <input type="text" name="user"><br><br>
<button type="button">Button</button>
<input type="reset" value="Reset">
<input type="submit" value="Submit"><br>
</form>
</body>
</html>

Output:
Name: