Home > Web Front-end > JS Tutorial > body text

javascript select list contents sorted in reverse alphabetical order and sorted in reverse list order_form effects

WBOY
Release: 2016-05-16 19:09:33
Original
1269 people have browsed it

Today, a netizen on 51js posted this question. I originally thought it was to arrange the content in alphabetical order in reverse order. Because I have read an article in alphabetical order before, I thought that it should not be difficult in reverse order. After checking the information, it was quick. Problem solved.


[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh to execute
]

But after reading the reply, it turns out that the original poster No, please describe the problem clearly. His original intention is to arrange the contents of the list in reverse order, that is, abcef becomes fecba.
I thought it was difficult to solve at first, but suddenly I remembered that the array has a reverse() function (arrange the contents of the array in reverse order), and the problem suddenly became very simple.

[Ctrl A select all Note:
If you need to introduce external Js, you need to refresh to execute ]
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template