不知道你的项目中有没有引入jQuery,so,写了个基本的方式,以下可能某些单次有错: input type="submit" 改成 input type="button" function createtword(){ var chkBoxs = document.getElementById("checkbox name"); boolean haveCheck = false; for(var i=0;i