Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. function bigImg(x) {
  2. x.style.height = "64px";
  3. x.style.width = "64px";
  4. }
  5.  
  6. function normalImg(x) {
  7. x.style.height = "32px";
  8. x.style.width = "32px";
  9. }
  10.  
  11. // Here the value is stored in new variable x
  12.  
  13. function myFunction5() {
  14. x=document.getElementById("FirstName").value;
  15. y=document.getElementById("LastName").value;
  16. document.getElementById("display").innerHTML=x+" "+y+", Welcome to my webpage"
  17. }
  18.  
  19. First Name:
  20. <input type="text"
  21. id="FirstName"
  22. value="First Name">
  23. </br>
  24.  
  25.  
  26.  
  27. Last Name:
  28. <input type="text"
  29. id="LastName"
  30. value="Last Name">
  31. </br>
  32.  
  33. <button type="button"
  34. onclick="myFunction5()">
  35. Output 1
  36. </button>
  37. <button type="button"
  38. onclick="myFunction5()">
  39. Output 2
  40. </button>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement