simplest way to create select menu

simplest way to create select menu

http://jsbin.com/apotot/3/edit

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset=utf-8 />
  5.   <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />
  6. <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
  7. <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
  8.   
  9. <title>JS Bin</title>
  10. </head>
  11. <body>
  12.   
  13. </body>
  14.   
  15.   <script>
  16.     $(document).ready(function (){
  17.       var s = $('<select/>');
  18. var o = [1, 2, 3];
  19. for (var i in o) {
  20.     s.append($('<option/>').html(o[i]));
  21. }
  22. $('body').append(s);
  23.            });
  24.   </script>
  25. </html>



what is wrong with this piece?