title: jQuery selector comparing element's attributes (and/or properties) between them
body: <p>The thing starts from my <a href="https://stackoverflow.com/questions/8369683/javascript-fast-way-to-check-if-form-contents-have-been-changed-before-submissi">previous question</a>:
  Using jQuery is it possible to compare two attributes in a selector?
  I mean something like:</p>
  
  <pre><code>$('element[atribute1!=attribute2]')
  </code></pre>
  
  <p>or, in a practical example:</p>
  
  <pre><code>$('input[name!=id]')
  </code></pre>
  
  <p>In my case, I would need it to get how many input fields haven't been changed in an html form used to edit something,
  I was trying to get this code to work:</p>
  
  <pre><code>if($('input[DefaultValue!=input.value]').lenght==0){...}
  </code></pre>
  
  <p>What about it?
  It should return the number of changed fields (if i get 0 i will stop form submission, show an alert message and go back without updating)</p>
  
  <p>Thank for your help.</p>