how to get input class value by javascript
<p>I know jQuery is easy to get the value but how can i use <strong>Javascript only</strong> to get the value?</p>

<p><a href="http://jsfiddle.net/2vRCU/" rel="nofollow">This is what I did</a></p>

<pre><code>&lt;input type="text" class="num" /&gt; &lt;a href="#" onclick="alert(document.getElementsByClassName('num').value);"&gt; click &lt;/a&gt;
</code></pre>

<p>​</p>

<p>thanks for help</p>
