标签:title char color charset nbsp lang length logs utf-8
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>冒泡算法</title> </head> <script> var bubbleSort = [9,2,3,8,7,5,4,6,1]; alert(bubbleSort) var a; for(var i=0;i<bubbleSort.length;i++){ for(var j=i+1;j<bubbleSort.length;j++){ if(bubbleSort[i]>bubbleSort[j]){ a=bubbleSort[i]; bubbleSort[i]=bubbleSort[j]; bubbleSort[j]=a; } // document.write(j); } // document.write(‘<br>‘); } alert(bubbleSort) </script> <body> </body> </html>
标签:title char color charset nbsp lang length logs utf-8
原文地址:http://www.cnblogs.com/dalaotan/p/7281591.html