Chech whether a textbox value is numeric or string
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/175739/is-there-a-built-in-way-in-javascript-to-check-if-a-string-is-a-valid-number">Is there a (built-in) way in JavaScript to check if a string is a valid number?</a>  </p>
</blockquote>



<p>i want to check whether a textbox contains a numeric value or a string using javascript
i used this.</p>

<pre><code>var query=getquerystring()
    if(isNaN(query))

        {
           alert("query is a string");
        }
        else{
           alert("query is numeric");

        }
</code></pre>

<p>where getquerystring() is a function as</p>

<pre><code>function getquerystring() {
            var query=document.getElementById("queryString").value;

            return  query;
         }
</code></pre>

<p>but when i enter a number 1234 in textbox still getting query is a string.
please tell me what is wrong in my code, and suggest me some solution.</p>
