Я использовал код JavaScript, чтобы отсортировать строки из входных страниц элементов, и это что-то вроде этого:Javascript вроде не работает корректно со строкой
a=document.getElementsByTagName("textarea");
input=a[0].innerHTML;
input=input.split(',');
input=input.sort();
alert(input);
var str=input.join();
str=str.replace(" ","");
входная строка имеет запятые и пробелы, поэтому, если вход что-то вроде:
yet, must, has, wants, would, some, are, let, own, can, could, which, his, had, got, our, only, also, every, after, other, may, you, them, while, ever, what, get, its, why, their, her, him, just, say, this, than, have, able, least, like, whom, nor, cannot, into, among
выход:
able, after, also, among, are, can, cannot, could, ever, every, get, got, had, has, have, her, him, his, into, its, just, least, let, like, may, must, nor, only, other, our, own, say, some, than, their, them, this, wants, what, which, while, whom, why, would, you,yet
и вы можете заметить тыс пока еще должно быть до вас, так что не так ????
просто замечательно, почему голосование вниз ?????????? ?? –