Home  >  jQuery

jQuery Attribute Not Equal Selector

February 26, 2013
jQuery provides API to search element which are not equal to given selector. jQuery not equal selector searches element which are not equal matches the attribute and not equal to given attribute’s value. We do like
<script>$('input[name!="xy"]').val('Nice');</script>
 
The wildcard ! is used for jQuery not equal selector. Find the complete example.
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<input type="button" name="axy"/>
<input type="button" name="xyb"/>
<input type="button" name="xy"/>

<script>$('input[name!="xy"]').val('Nice');</script>
</body>
</html>
 
Output
FIND MORE TUTORILAS






©2019 concretepage.com | Privacy Policy | Contact Us