判断行数 - davy-gan/web GitHub Wiki var universalNewline = /\r\n|\r|\n/g; var line_count = s.split(universalNewline).length;