Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <head>
- <style type="text/css">
- body {
- margin: 0;
- padding: 0;
- }
- #sidhuvud {
- background: #cc99cc;
- padding: 20px;
- }
- #kolumn1 {
- float: left;
- width: 250px;
- min-height: 550px;
- padding: 0 20px 20px 20px;
- border-right: 1px solid #000;
- }
- #kolumn2 {
- float: left;
- width: 60%;
- min-height: 550px;
- padding: 0 20px 20px 20px;
- border-right: 1px solid #000;
- }
- #kolumn3 {
- float: right;
- width: 250px;
- min-height: 550px;
- padding: 0 20px 20px 20px;
- border-right: 1px solid #000;
- }
- </style>
- <meta charset="utf-8">
- </head>
- <body>
- <div id="sidhuvud">
- <p> </p>
- </div>
- <div id="kolumn1">
- <p> </p>
- </div>
- <div id="kolumn2">
- <p> </p>
- <p><br>
- <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;
- margin-left: auto;
- margin-right: auto;"></iframe></div>
- </div>
- <div id="kolumn3">
- <ul>
- <table id="outside">
- <tr><td id="t1"><li class="button3">Test me</li></td></tr>
- <tr><td id="t2">one</td></tr>
- </table>
- </ul>
- <br>
- <div id="log"></div>
- <script>
- //test button
- // Function to change the content of t2
- function modifyText() {
- var t2 = document.getElementById("t2");
- if (t2.firstChild.nodeValue == "two") {
- t2.firstChild.nodeValue = "one";
- window.open("http://www.w3schools.com","content");
- } else {
- t2.firstChild.nodeValue = "two";1
- window.open("http://www.google.com",'content');
- }
- }
- //test button
- // add event listener to table
- var el = document.getElementById("outside");
- el.addEventListener("click", modifyText, false);
- </script>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement