日期:2014-05-20  浏览次数:20714 次

增加删除一个UBB怎么做,这样调试不对。请高手帮我改改!
<html xmlns=" http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>增加删除UBB</title>
<script type="text/javascript">   
  <!--
      var textNumber = 1;
      function addTextBox(form, afterElement) {
          textNumber++;
          var label = document.createElement("SPAN");
          document.getElementById("all").appendChild(label);
          var textField = document.createElement("textarea");
          textField.setAttribute("style","WIDTH:600px;HEIGHT:100px");
          textField.setAttribute("name", "content");
          textField.setAttribute("id", "content" + textNumber);
          label.appendChild(document.createTextNode("颜色#"+textNumber+":"));
          label.appendChild(textField);
          var textField2 = document.createElement("script");
          textField2.setAttribute("type", "text/javascript");
          textField2.setAttribute("nEditor", "new ubbEditor('content');");
          textField2.setAttribute("nEditor.tLang", "zh-cn");
          textField2.appendChild(document.createTextNode("nEditor.tInit('nEditor', '../ubbeditor/')"));
          label.appendChild(textField2);
          label.appendChild(document.createElement("br"));//回车换行
          //   Add   it   all   to   the   form   
          form.insertBefore(label, afterElement);
          return false;
      }
      function removeTextBox(form) {
          if (textNumber > 1) {
              form.removeChild(document.getElementById("content" + textNumber).parentNode);
              //form.removeChild(document.getElementById("price" + textNumber).parentNode);
              textNumber--;
          }
     }   
  //-->   
  </script>   
<script type="text/javascript" src="../ubbeditor/ubbEditor.js"></script>

 
</head>
<body>
    <form id="form1" runat="server">
    <div id="all" style="width:300px">
<textarea id="content" name="content" style="WIDTH:600px;HEIGHT:100px"></textarea>