Displaying image in jquery
<p>I am trying to display the image by giving the static path the following way.But the image is not displaying.Could any one please figure out where i went wrong.
The following is my code</p>

<pre><code>$("#p").live('click', function (event){var pathname = '';
$("input[type=file]").each(function () {

    var pathname = pathname+$(this).val();
    var f = pathname.replace(/^.*[\\\/]/, ''); 
    alert(f);
    $("#s").attr('src', f);
  });
</code></pre>

<p>html code</p>

<pre><code> &lt;img style="margin-top:0px; width:2in; height:2in;" id="s" class="imagePreview" /&gt;       
 &lt;input type="button" value="Preview" class="k-button" id="p" /&gt; 
 &lt;div id="example" class="k-content"&gt; 
    &lt;div class="configuration k-widget k-header"&gt;  
    &lt;/div&gt; 
    &lt;form method="post" action="" style="width:45%"&gt; 

    &lt;div&gt; &lt;input name="files" id="files" type="file" onpropertychange="checkimage()"/&gt; 

    &lt;input type="button" value="Submit" class="k-button" id="sub"/&gt; &lt;/div&gt; 
    &lt;/form&gt; 
  &lt;/div&gt;
</code></pre>
