Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. <!doctype html>
  2. <head>
  3.  
  4. <style type="text/css">
  5. body {
  6. margin: 0;
  7. padding: 0;
  8. }
  9. #sidhuvud {
  10. background: #cc99cc;
  11. padding: 20px;
  12. }
  13. #kolumn1 {
  14. float: left;
  15. width: 250px;
  16. min-height: 550px;
  17. padding: 0 20px 20px 20px;
  18. border-right: 1px solid #000;
  19. }
  20. #kolumn2 {
  21. float: left;
  22. width: 60%;
  23. min-height: 550px;
  24. padding: 0 20px 20px 20px;
  25. border-right: 1px solid #000;
  26. }
  27. #kolumn3 {
  28. float: right;
  29. width: 250px;
  30. min-height: 550px;
  31. padding: 0 20px 20px 20px;
  32. border-right: 1px solid #000;
  33. }
  34. </style>
  35.  
  36. <meta charset="utf-8">
  37. </head>
  38. <body>
  39. <div id="sidhuvud">
  40. <p>&nbsp;</p>
  41. </div>
  42. <div id="kolumn1">
  43. <p>&nbsp;</p>
  44. </div>
  45.  
  46. <div id="kolumn2">
  47. <p>&nbsp;</p>
  48. <p><br>
  49.  
  50. <div id="content"><iframe name="content" width="850" height="500" src="http://www.dreamincode.net/forums/topic/215340-open-href-into-a-div/" style="display: block;
  51. margin-left: auto;
  52. margin-right: auto;"></iframe></div>
  53.  
  54. </div>
  55.  
  56.  
  57. <div id="kolumn3">
  58. <ul>
  59.  
  60. <table id="outside">
  61. <tr><td id="t1"><li class="button3">Test me</li></td></tr>
  62. <tr><td id="t2">one</td></tr>
  63. </table>
  64.  
  65. </ul>
  66. <br>
  67.  
  68. <div id="log"></div>
  69.  
  70. <script>
  71. //test button
  72. // Function to change the content of t2
  73. function modifyText() {
  74. var t2 = document.getElementById("t2");
  75. if (t2.firstChild.nodeValue == "two") {
  76. t2.firstChild.nodeValue = "one";
  77. window.open("http://www.w3schools.com","content");
  78. } else {
  79. t2.firstChild.nodeValue = "two";1
  80. window.open("http://www.google.com",'content');
  81. }
  82. }
  83.  
  84. //test button
  85. // add event listener to table
  86. var el = document.getElementById("outside");
  87. el.addEventListener("click", modifyText, false);
  88.  
  89. </script>
  90.  
  91. </div>
  92.  
  93. </body>
  94. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement