php - In HTML, how can I make a button that reverse sorts a massive -
php - In HTML, how can I make a button that reverse sorts a massive -
in html, how can create button reverse sorts massive.. $m = explode($s) form_method="post"
i assume mean client-side, not html. if so, utilize array.sort().
http://www.javascriptkit.com/javatutors/arraysort.shtml
"massive" relative term, have tested array.sort complex object sorts arrays containing couple one thousand items no issues.
simplified, looks this.
<input type="button" onclick="performsort()" /> <script> function performsort() { var arr = []; // populate 'arr' items sort arr.sort(); // output sorted results dom } </script> php html
Comments
Post a Comment