How to alert(date) with jquery?
<p>I am trying with this, but it is undignified.</p>

<p>In html.</p>

<pre><code> &lt;BDP:BasicDatePicker ID="DOBpicker" runat="server" CssClass="txtBox" DisplayType="TextBox"
  ValidationGroup="userRegistration" /&gt; 
</code></pre>

<p>in jquery, I tried with this</p>

<pre><code> function btn()
{
  var date = $('#DOBpicker').val();
  alert(date);
}
</code></pre>

<p><strong>or</strong> </p>

<pre><code>function btn()
{
  var date = document.getElementById('DOBpicker').value;
  alert(date);
}
</code></pre>

<p>call this function on btn</p>

<pre><code>&lt;input id="test" type="button" value="go" onclick="btn()" /&gt;
</code></pre>

<p>But it undefined. </p>
