把你的 input type="button" name="addclass" value="增加类" 中的type
值改为type="submit"
另外,你的function check()中不需要用参数,都可以直接form1来执行代码