Guest User

Untitled

a guest
Jul 18th, 2019
56
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang = "en-US">
  3. <head>
  4. <meta charset = "UTF-8">
  5. <title>Inner.html</title>
  6. <script type = "text/javascript">
  7. //text box
  8. function sayHi()
  9. {
  10. var txtName = document.getElementById("txtName") ;
  11. var divOutput = document.getElementById("divOutput") ;
  12. var name = txtName.value ;
  13. divOutput.innerHTML = "<em>" + name + "</em>";
  14. divOutput.innerHTML = "is a very nice name.";
  15. }
  16. //end HI
  17. </script>
  18. <link rel = "stylesheet"
  19. type= "text/css"
  20. href = "textBoxes.css" />
  21. </head>
  22. <body>
  23. <h1>Inner HTML </h1>
  24. <form action = "">
  25. <fieldset>
  26. <label>Pleae type your name</label>
  27. <input type = "text"
  28. id = "txtName"/>
  29. <button type = "button"
  30. onclick = "sayHi()" >
  31. Click Me
  32. </button>
  33. </fieldset>
  34. </form>
  35. <div id = "divOutput">
  36. Watch this space.
  37. </div>
  38. </body>
  39. </html>
  40.  
  41. The program should take name input and output "Maurice is a very nice
  42. name" */
RAW Paste Data