Not being able to use a variable defined in jquery into html
<p>I want the variable 'value' to be printed using document.write() everytime a a color from drop down is selected.</p>

<pre><code>&lt;script type="text/javascript"&gt;
    var value = 'xyz';

             $(document).ready(function(){ 
                  $('#button1').click(function(){ 
                    value = $('#combo').val();
                  alert (value);

                    });
        }); 

    &lt;/script&gt;
&lt;select id  = "combo"&gt;
    &lt;option&gt;White&lt;/option&gt;
    &lt;option&gt;Yellow&lt;/option&gt;
    &lt;option&gt;Fuchisa&lt;/option&gt;
    &lt;option&gt;Red&lt;/option&gt;
    &lt;option&gt;Silver&lt;/option&gt;
    &lt;option&gt;Gray&lt;/option&gt;
    &lt;option&gt;Olive&lt;/option&gt;
&lt;/select&gt;
&lt;input id="button1" type="button" value="Click!" /&gt;
&lt;p&gt;&lt;script type="text/javascript"&gt; document.write(value) &lt;/script&gt;&lt;/p&gt;
</code></pre>
