<form id="form1" name="form1" method="post" action="">
<input type="text" name="a" id="a" />
<input type="button" name="button" id="button" value="输入" onclick="g()">
<textarea name="b" id="b" cols="45" rows="5"></textarea>
<script language="javascript">
var str = document.getElementById('a').value
document.getElementById('b').value=str