<body id=th>
<a href=#>gfh></a><a href=#>dfd</a>
<input type=text id=txtBox>
</body><script language=vbscript>
Sub th_onClick()
dim obj
Set obj=window.event.srcElement
if obj.tagname= "A" Then txtBox.value= obj.innertext
End Sub
</script>
<a href=#>gfh></a><a href=#>dfd</a>
<input type=text id=txtBox>
</body><script language=vbscript>
Sub th_onClick()
dim obj
Set obj=window.event.srcElement
if obj.tagname= "A" Then txtBox.value= obj.innertext
End Sub
</script>
alert(a.innerText);
document.getElementById("text101").value=a.innerText;
}<a href=# onclick="fun100(this)">gfh</a>
<input type="text" name="text101" id="text101">