Advertisement
svetoslavhl

1-1

Jun 2nd, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Script-Type" content="text/javascript" />
  5. <title>Our Insurance</title>
  6. </head>
  7. <body>
  8. <!-- Навигация в DOM; Взаимодействие с върхове -->
  9. <!-- File:listing-8-1.htm -->
  10. <div id="heading1">Buildings Insurance</div>
  11. <p id="para1">
  12. You need this type of insurance to cover you in case of
  13. <span id="risk">severe damage to your home</span>
  14. (for example fire, flood, vehicle or tree crashing into it)
  15. as well as more everyday risks like accidentally breaking a window
  16.  
  17. </p>
  18. <div id="heading2">Contents Insurance</div>
  19. <p id="para2">
  20. You need this type of insurance to cover
  21. <span id="items">things in your house</span>,
  22. such as furniture, electrical goods, carpets and curtains, against risks such as fire, theft, water damage (due to burst pipes, etc) or accidental breakage
  23. </p>
  24. <script type="text/javascript">
  25. <!--
  26. document.write("Paragraph 1 is node name " + document.getElementById("para1").nodeName);
  27. document.write("<br />Paragraph 1 is node type " + document.getElementById("para1").nodeType);
  28. document.write("<br />The text node firstChild inside paragraph 1 is " + document.getElementById("para1").firstChild.nodeValue);
  29. document.write("<br />The text node lastChild inside paragraph 1 is " + document.getElementById("para1").lastChild.nodeValue);
  30. document.write("<br />The attribute value of the first div is " + document.getElementById("heading1").getAttribute("id"));
  31. // -->
  32. </script>
  33. </body>
  34. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement