Home >>jQuery Tutorial >jQuery submit Selector
jQuery submit selector in jQuery is used to selects button and input elements with type=submit.
Syntax:$(":submit")Here is an Example of jQuery :submit Selector
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(":submit").css("background-color", "#c0ed1f");
});
</script>
</head>
<body>
<form action="">
Name: <input type="text" name="user"><br>
Password: <input type="password" name="password"><br>
<input type="submit" value="Submit"><br>
</form>
</body>
</html>