I get an error message "undefined" for the following script..

any help?

thanks

VB Code:
  1. <html><head>
  2. <script>
  3. var h=0;
  4. function yaz()
  5. {
  6. for(h=0;h<=6;h++)
  7. {
  8. var rno=(Math.floor(Math.random()*50)+1);
  9. document.getElementById('oda').innerHTML=rno[h];
  10. }
  11. }
  12. </script></head><body>
  13. <div id="oda">......</div>
  14. <form>
  15. <input type=button value="print the rand nums" onClick="yaz()">
  16. </form></body></html>