日期:2014-05-17 浏览次数:20987 次
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <SCRIPT LANGUAGE="JavaScript">
  <!--
    function addattachfrom() {
        var newnode = document.getElementById('attachSrc').firstChild.cloneNode(true);
        document.getElementById('attachDest').appendChild(newnode);
    }
    function removeattachfrom() {
        var dest = document.getElementById('attachDest');
        dest.childNodes.length >= 1 && dest.lastChild ? dest.removeChild(dest.lastChild) : 0;
    }
  //-->
  </SCRIPT>
 </HEAD>
 <BODY>
 提示:点击[+]可以增加表单,点击[-]可以减少表单
  <table width="90%" align="center" cellpadding="0" cellspacing="0" class="celltable">
      <tbody id="attachSrc">
        <tr><td width="100%">
            <table width="502" border="1" cellpadding="2" cellspacing="2" class="gray" style="border-left:1px solid #DEDEDE;border-right:1px solid #DEDEDE;border-top:1px solid #DEDEDE;border-bottom:1px solid #DEDEDE;">
  <tr>
                    <td width="20%" align="right">名称</td>
                    <td width="40%" align="left">
                        <input type="text" name="GoodsName"/></td>
                    <td width="40%" align="left"><input type="text" name="GoodsName2"/></td>
  </tr>
            </table>
        </td></tr>
      </tbody>
      <tbody id="attachDest"></tbody>
  </table><br />
  <a href="#add" onClick="addattachfrom();"> [+]</a>
  <a href="#remove" onClick="removeattachfrom();">[-]</a>
 </BODY>
</HTML>