Selecting elements whose attribute value doesn't contain certain characters using jQuery.

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 277
To find out all elements whose specific attribute value does not contain certain characters we can use "!=" operator.

<input id="txtName" type="text" data-id="txt Name" />
<input id="FirstNameF" type="text" data-id="name txt" />
<input type="button" value="Button" id="btnTest" />

<script>
$(function()
{
$("input[type!='text']").css("border", "1px solid blue");
});
</script>

Comments or Responses

Login to post response