jQuery中$("#id")只能选择第一个对象,不能选择所有相同id的元素。 通过 $("input[id='xxxx']"); 可以选择多个相同id的元素。 转载于:https://www.cnblogs.com/lizhancheng/p/3989330.html