title: get full image path and put in img src using javascript
body: <p>I want to get the fullpath of image that i select in , and the problem after i select the image there is no image appear.</p>
  
  <p>help me please :)</p>
  
  <p>Here is my code.</p>
  
  <p>JAVASCRIPT</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function imgchange()
  {
          var filePath = $('#file').val();
          $("#imgs").attr('src',filePath);
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>HTML </p>
  
  <pre><code>            &lt;form action="#" method="post" enctype="multipart/form-data"&gt;
                  &lt;center&gt;
                      &lt;table&gt;
                          &lt;tr&gt;
                                  &lt;td colspan="2"&gt;&lt;center&gt;&lt;img id="imgs" width="170px" height="160px" &gt;&lt;/img&gt;&lt;/center&gt;&lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td align="right"&gt;&lt;b&gt;&lt;label for="file"&gt;Filename:&lt;/label&gt;&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;input type="file" name="file" id="file" onchange="imgchange()"&gt;&lt;/td&gt;
                          &lt;/tr&gt;                               
                      &lt;/table&gt;    
                  &lt;/center&gt;
              &lt;div class="buttons_save"&gt;
                  &lt;button class="buttons_profile3" id="btnSubmit" &gt;SAVE&lt;/button&gt;
              &lt;/div&gt;
          &lt;/form&gt;
  </code></pre>