Prev Demo
jQuery
>
Element[Attribute$='Value' - Attribute Ends With
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> </head> <body> <input id="txtName" type="text" data-id="txt Name" /> <input id="FirstName" type="text" data-id="name txt" /> <input id="Address" type="text" data-id="name txt" /> <input id="btnTest" type="button" value="Button" /> <script> $(function () { $("input[id$='Name']").css("border", "1px solid red"); }); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output