You want to selects elements that have the specified attribute with a value exactly equal to a certain value.
Let's say you have an form input element defined as follows:
<input id="txtName" class="myStyle" type="text" size="12" maxlength="20" />
To select element based on its size or maxlength attributes value you can use:
$("input[size='12']");
$("input[maxlength='20']");