Advertisement
1xptolevitico69

How to change input value

May 29th, 2019
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.55 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title></title>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width">
  7. <style>
  8.    body {  overflow:hidden;    }
  9.    #input {   font-size:30px;       }
  10.    #span {   padding:10px 30px;border:1px solid;cursor:pointer;   }
  11. </style>
  12. </head>
  13. <body>
  14. <input type='text' id='input' value='bring me some potato' size='50'/><p>
  15. <span id='span'>onclick change input font-size</span>
  16.  
  17. <script>
  18. span.onclick=()=>{
  19. input.style.fontSize='80px';
  20. input.style.fontFamily='Segoe Script';
  21. }
  22. </script>
  23. </body>
  24. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement