Give PHP value into Javascript in same page
<p>How can I give the ID value to Javascript in same page.</p>

<p>Example data :</p>

<pre><code>&lt;a href="" id="ctextarea&lt;?php echo $uid; ?&gt;"/&gt;
</code></pre>

<p>JS :</p>

<pre><code>function recountss()
        {
            var maxlen=280;
            var current = maxlen-$('#ctextarea').val().length;
            $('.counters').html(current);


            if(current&lt;0 || current==maxlen)
            {
                $('.counters').css('color','#D40D12');
                $('input.comment_button').attr('disabled','disabled').addClass('inact');
            }
            else if (!$.trim($("#ctextarea").val())) {
                $('input.comment_button').attr('disabled','disabled').addClass('inact');
            }
            else
                $('input.comment_button').removeAttr('disabled').removeClass('inact');


            if(current&lt;10)
                $('.counters').css('color','#D40D12');

            else if(current&lt;20)
                $('.counters').css('color','#5C0002');

            else
                $('.counters').css('color','#C0C0C0');
        }
</code></pre>

<p>I tried using get class, but it's effect for 1 data not for many data.
Have idea ?</p>

<p>Thanks.</p>
