In this tutorial, We will learn how to get attribute value in jquery. You can get the attribute value in jquery.
Example:
<html lang="en">
<head>
<title>Get Attribute Value</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
</head>
<body>
<input type="text" name="name" id="textbox1">
<script type="text/javascript">
var input_type = $("input").attr("type");
alert(input_type);
var input_id = $("input").data("id");
alert(input_id);
var input_name = $("input").attr("name");
alert(input_name);
</script>
</body>
</html>
Thanks, May this example will help you.