title: How to get only id using jquery
body: <p>i want fetch only uid from input field using jquery.
  I am not getting how to fetch only uid from that id
  below is my input filed with auto increment</p>
  <pre><code>&lt;input type=&quot;file&quot; class=&quot;filedtat&quot; name=&quot;abc_doc_'.$uid.'&quot; id=&quot;abc_doc_'.$uid.'&quot; class=&quot;form-control-file&quot;&gt;
  </code></pre>
  <p>Nd front end will be</p>
  <pre><code>&lt;input type=&quot;file&quot; class=&quot;filedtat&quot; name=&quot;abc_doc_0&quot; id=&quot;abc_doc_0&quot; class=&quot;form-control-file&quot;&gt;
  </code></pre>
  <p>I am doing for only one input field like below</p>
  <pre><code> $(&quot;#filedtat&quot;).change(function() {
         var id = $(this).attr('id');
                      $(&quot;#upload_purchase_doc&quot;+id).val('');
                  });
  </code></pre>
  <p>But i am getting whole id . I just want (0,1,2 etc)
  i want make other field empty on that.
  i just want only 0 from that id .. anyone have idea then let me know</p>