你的意思是取一个文本框的内容还是全部的内容都要取呢?
如果是取一个文本框的内容的话,可以用下面的方法(一个例子):
<body>
<form name="form1">
  <div id="div1">
    <input  id="txt1" type="text" name="txt1">
    <input id="txt2" type="text" name="txt2"> 
  </div>
</form>
<input name="" type="button" value="显示text1的值" onClick='document.all.showValue.innerHTML=document.all.txt1.getAttribute("value");'>
<input name="" type="button" value="显示text2的值" onClick='document.all.showValue.innerHTML=document.all.txt2.getAttribute("value");'>
<span id="showValue"></span>
</body>