Advertisement
gaz_lloyd

Untitled

Sep 12th, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <p>Click the button to create a Number field.</p>
  6.  
  7. <button onclick="myFunction()">Try it</button>
  8.  
  9. <script>
  10. function myFunction() {
  11. var x = document.createElement("INPUT");
  12. x.setAttribute("type", "number");
  13. x.setAttribute("value", "12345");
  14. document.body.appendChild(x);
  15. }
  16. </script>
  17.  
  18. </body>
  19. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement