Changing input element value in the fly
<p>I'm trying to create a voting system. So when the user clicks the "Vote" button, I want to display the vote count alongside which reflects the count in real time.</p>

<p>I'm using a code something like</p>

<p>HTML</p>

<pre><code>&lt;div class='left'&gt;
    &lt;input id='vote' name='voteCount' type='button' value='1' /&gt;
&lt;/div&gt;
</code></pre>

<p>JavaScript</p>

<pre><code>$.ajax({
    type: "POST",
    url: "vote.php",
    data: dataPass,
    cache: false,
    success: function(html){
        $("#vote").val() = count;
    }
});
</code></pre>

<p>I'm using the input button to display the vote count since I think it's easier for me to get the button value using jQuery <code>.val()</code> (which is going to be the vote count at present) then increment it when a user votes it and display the vote count simply by setting the new value as the value of the button.</p>

<p>However, the above codes doesn't seen to work. The value doesn't update after setting it.
So can anyone tell me what's the best way to display the vote count in real time?</p>
