<script type="text/javascript"> function showHint(str){ alert (str) } </script> <input type="text" name="textfield" id="textfield" onchange="showHint(this.value)" /> <p> <a href="" onclick="showHint(value.id="textfield")">clik </a></p>
<input type=text name='test' value='Hello'> <input type=button value=Crack OnClick="javascript:alert(test.value);">