首先要给Form一个ID属性,然后通过ID.Name.Text="字符串"即可,不过,最后不要使用"Name"作为编辑框的名字,因为它是一个关键字.

解决方案 »

  1.   

    你的<form>没有命名,代码改为:
    <script languge="vbscript">
    <!--
      sub b2_onclick()
      //请你写入,功能:给FORM中的NAME赋值
      form1.name="abcd"
      end sub
    -->
    </script>
    <form method="post" action="next.asp" name="form1">
    <input type="text" name="name" size="20">
    <input type="submit" name="b1">
    </form>
    <input type="button" name="b2">
    或:
    <script languge="vbscript">
    <!--
      sub b2_onclick()
      //请你写入,功能:给FORM中的NAME赋值
      name.value="abcd"
      end sub
    -->
    </script>
    <form method="post" action="next.asp">
    <input type="text" id="name" size="20">
    <input type="submit" name="b1">
    </form>
    <input type="button" name="b2">