$('#ulArea2 input:text').each(function (element) { if (this.value != "" && this.disabled == false) { codePush.push(this.value.substring(0, 20));//数组 } });