<script type="text/javascript">
function func1(elem)
{
alert(elem.value);
func2(elem.getAttribute("id"));
}
function func2(id)
{
alert(id);
}
</script>
<input type="text" id="post" size="10" maxlength="5" />
<input type="submit" value="Go" onclick="javascript:func1(document.getElementById('post'))" />