 function wks(){ var fal=document.getElementById("fal").value; var imgurl=document.getElementById("imgurl").value; var se=document.getElementById("se").value; var currtext=document.getElementsByName("th")[0].value; document.getElementsByName("th")[0].value=fal+imgurl+se+currtext;}