- <html> 
-     <head> 
-         <script type="text/javascript"> 
-               function datos(dat){ 
-                  alert('valor '+dat); 
-               } 
-         </script> 
-         <script type="text/javascript"> 
-             var i; 
-              var a='<select id=sel name=sel onchange=datos(this.value)>n'; 
-              var b; 
-              var c; 
-             for( i=0;i<10;i++){ 
-              b+='<option id=idsel value='+i+'>valor '+i+'</option>n';  
-                
-             } 
-             c=a+b; 
-             document.write(c); 
-         </script> 
-     </head> 
-     <body> 
-     </body> 
- </html> 
-