Advertisement
Guest User

Untitled

a guest
May 25th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>3D Printer Calculator</title>
  4. </head>
  5.  
  6. <body bgcolor="#009FB7">
  7.  
  8. <div id="content">
  9. <p id="demo" >$$$</p>
  10. <input type="text" name="length" id="lengthForm" value="Length of Filament" />
  11. <br>
  12. <button onclick="myFunction()">Enter</button>
  13. </div>
  14.  
  15. <script>
  16. function myFunction() {
  17. var lengthValue = document.getElementById("lengthForm").value;
  18. document.getElementById("demo").innerHTML = "This print will cost $" + (lengthValue * 0.00022513).toFixed(2) + " !";
  19. document.getElementById("lengthForm").innerHTML = "Length of Filament";
  20. }
  21. </script>
  22.  
  23. <style>
  24. #content {
  25. padding: 100px;
  26.  
  27. }
  28.  
  29. #content button {
  30. margin: auto;
  31. display: block;
  32.  
  33. background-color: #4CAF50; /* Green */
  34. border: none;
  35. border-radius: 12px;
  36. color: white;
  37. padding: 15px 32px;
  38. text-align: center;
  39. text-decoration: none;
  40. font-size: 16px;
  41. }
  42.  
  43. #content input {
  44. margin: auto;
  45. display: block;
  46. text-align: center;
  47. height: 50px;
  48. width: 250px;
  49. font-size: 16pt;
  50. }
  51.  
  52. #content p {
  53. text-align: center;
  54. font-size: 36pt;
  55. font-family: Verdana
  56. }
  57. </style>
  58. </body>
  59. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement