BrU32

W3 schools un copywrited code

Jul 23rd, 2016
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.88 KB | None | 0 0
  1. //////
  2.  
  3.  
  4. <!DOCTYPE html>
  5. <html lang="en-US">
  6. <head>
  7. <title>Tryit Editor v2.6</title>
  8.  
  9.  
  10.  
  11. var node = document.getElementsByTagName('script')[0];
  12.  
  13. alert(node.src);
  14. })();
  15. </script>
  16. <script type='text/javascript'>
  17. // GPT slots
  18. var gptAdSlots = [];
  19. googletag.cmd.push(function() {
  20.  
  21. var leaderMapping = googletag.sizeMapping().
  22. // Mobile ad
  23. addSize([0, 0], [320, 50]).
  24. // Vertical Tablet ad
  25. addSize([468, 0], [468, 60]).
  26. // Horizontal Tablet
  27. addSize([728, 0], [728, 90]).
  28. // Desktop and bigger ad
  29. // addSize([970, 0], [[728, 90], [970, 90]]).build();
  30. addSize([970, 0], [728, 90]).build();
  31. // gptAdSlots[0] = googletag.defineSlot('/16833175/TryitLeaderboard', [[728, 90], [970, 90]], 'div-gpt-ad-1428407818244-0').
  32. gptAdSlots[0] = googletag.defineSlot('/16833175/TryitLeaderboard', [728, 90], 'div-gpt-ad-1428407818244-0').
  33. defineSizeMapping(leaderMapping).addService(googletag.pubads());
  34.  
  35.  
  36. googletag.pubads().setTargeting("content","tryhtml");
  37. googletag.enableServices();
  38. });
  39. </script>
  40. <script>
  41. if (window.addEventListener) {
  42. window.addEventListener("resize", browserResize);
  43. } else if (window.attachEvent) {
  44. window.attachEvent("onresize", browserResize);
  45. }
  46. var xbeforeResize = window.innerWidth;
  47.  
  48. function browserResize() {
  49. var afterResize = window.innerWidth;
  50. if ((xbeforeResize < (970) && afterResize >= (970)) || (xbeforeResize >= (970) && afterResize < (970)) ||
  51. (xbeforeResize < (728) && afterResize >= (728)) || (xbeforeResize >= (728) && afterResize < (728)) ||
  52. (xbeforeResize < (468) && afterResize >= (468)) ||(xbeforeResize >= (468) && afterResize < (468))) {
  53. xbeforeResize = afterResize;
  54. googletag.cmd.push(function() {
  55. googletag.pubads().refresh([gptAdSlots[0]]);
  56. });
  57. }
  58. }
  59. </script>
  60. <script type="text/javascript">
  61. function submitTryit() {
  62. var text = document.getElementById("textareaCode").value;
  63. var ifr = document.createElement("iframe");
  64. ifr.setAttribute("frameborder", "0");
  65. ifr.setAttribute("id", "iframeResult");
  66. document.getElementById("iframewrapper").innerHTML = "";
  67. document.getElementById("iframewrapper").appendChild(ifr);
  68. var ifrw = (ifr.contentWindow) ? ifr.contentWindow : (ifr.contentDocument.document) ? ifr.contentDocument.document : ifr.contentDocument;
  69. ifrw.document.open();
  70. ifrw.document.write(text);
  71. ifrw.document.close();
  72. }
  73. </script>
  74. <style>
  75.  
  76. </style>
  77. </head>
  78. <body>
  79. <div id='tryitLeaderboard'>
  80. <!-- TryitLeaderboard -->
  81. <div id='div-gpt-ad-1428407818244-0'>
  82. <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1428407818244-0'); });</script>
  83. </div>
  84. </div>
  85.  
  86. <div class="container">
  87. <div class="textareacontainer">
  88. <div class="textarea">
  89. <div style="overflow:auto;">
  90. <div class="headerText">Edit This Code:</div>
  91. <button class="seeResult" type="button" onclick="submitTryit()">See Result &raquo;</button>
  92. </div>
  93. <div class="textareawrapper">
  94. <textarea autocomplete="off" class="code_input" id="textareaCode" wrap="logical" spellcheck="false"><!DOCTYPE html>
  95. <html>
  96. <head>
  97. <title>Page Title</title>
  98. </head>
  99. <body>
  100.  
  101. <h1>This is a Heading</h1>
  102. <p>This is a paragraph.</p>
  103.  
  104. </body>
  105. </html>
  106. </textarea>
  107. <form autocomplete="off" style="margin:0px;display:none;">
  108. <input type="hidden" name="code" id="code" />
  109. <input type="hidden" id="bt" name="bt" />
  110. </form>
  111. </div>
  112. </div>
  113. </div>
  114. <div class="iframecontainer">
  115. <div class="iframe">
  116. <div style="overflow:auto;">
  117. <div class="headerText">Result:</div>
  118. </div>
  119. <div id="iframewrapper" class="iframewrapper">
  120.  
  121. </div>
  122. </div>
  123. </div>
  124. <div class="footerText">Try it Yourself - &copy; <a href="http://www.w3schools.com">w3schools.com</a></div>
  125. </div>
  126. <script>submitTryit()</script>
  127. </body>
  128. </html>
  129. //////
  130. <script type="text/javascript">
  131. function submitTryit() {
  132. var text = document.getElementById("textareaCode").value;
  133. var ifr = document.createElement("iframe");
  134. ifr.setAttribute("frameborder", "0");
  135. ifr.setAttribute("id", "iframeResult");
  136. document.getElementById("iframewrapper").innerHTML = "";
  137. document.getElementById("iframewrapper").appendChild(ifr);
  138. var ifrw = (ifr.contentWindow) ? ifr.contentWindow : (ifr.contentDocument.document) ? ifr.contentDocument.document : ifr.contentDocument;
  139. ifrw.document.open();
  140. ifrw.document.write(text);
  141. ifrw.document.close();
  142. }
  143. </script>
  144. <style>
  145.  
  146. </style>
  147. </head>
  148. <body>
  149. <div id="tryitLeaderboard">
  150. <!-- TryitLeaderboard -->
  151. <div id="div-gpt-ad-1428407818244-0">
  152. <script type="text/javascript">googletag.cmd.push(function() { googletag.display('div-gpt-ad-1428407818244-0'); });</script>
  153. </div>
  154. </div>
  155.  
  156. <div class="container">
  157. <div class="textareacontainer">
  158. <div class="textarea">
  159. <div style="overflow:auto;">
  160. <div class="headerText">Edit This Code:</div>
  161. <button class="seeResult" type="button" onclick="submitTryit()">See Result »</button>
  162. </div>
  163. <div class="textareawrapper">
  164. <textarea autocomplete="off" class="code_input" id="textareaCode" wrap="logical" spellcheck="false"></textarea>
  165. <form autocomplete="off" style="margin:0px;display:none;">
  166. <input type="hidden" name="code" id="code">
  167. <input type="hidden" id="bt" name="bt">
  168. </form>
  169. </div>
  170. </div>
  171. </div>
  172. <div class="iframecontainer">
  173. <div class="iframe">
  174. <div style="overflow:auto;">
  175. <div class="headerText">Result:</div>
  176. </div>
  177. <div id="iframewrapper" class="iframewrapper">
  178.  
  179. </div>
  180. </div>
  181. </div>
  182. <div class="footerText">Try it Yourself - © <a href="http://www.w3schools.com">w3schools.com</a></div>
  183. </div>
  184. <script>submitTryit()</script>
  185.  
  186.  
  187. </body></html>
  188.  
  189. /////
  190. <script type="text/javascript">
  191. function submitTryit() {
  192. var text = document.getElementById("textareaCode").value;
  193. var ifr = document.createElement("iframe");
  194. ifr.setAttribute("frameborder", "0");
  195. ifr.setAttribute("id", "iframeResult");
  196. document.getElementById("iframewrapper").innerHTML = "";
  197. document.getElementById("iframewrapper").appendChild(ifr);
  198. var ifrw = (ifr.contentWindow) ? ifr.contentWindow : (ifr.contentDocument.document) ? ifr.contentDocument.document : ifr.contentDocument;
  199. ifrw.document.open();
  200. ifrw.document.write(text);
  201. ifrw.document.close();
  202. }
  203. </script>
  204. <style>
  205.  
  206. </style>
  207. </head>
  208. <body>
  209. <div id="tryitLeaderboard">
  210. <!-- TryitLeaderboard -->
  211. <div id="div-gpt-ad-1428407818244-0">
  212. <script type="text/javascript">googletag.cmd.push(function() { googletag.display('div-gpt-ad-1428407818244-0'); });</script>
  213. </div>
  214. </div>
  215.  
  216. <div class="container">
  217. <div class="textareacontainer">
  218. <div class="textarea">
  219. <div style="overflow:none;">
  220. <div class="headerText">Edit This Code:</div>
  221. <button class="seeResult" type="button" onclick="submitTryit()">See Result »</button>
  222. </div>
  223. <div class="textareawrapper">
  224. <textarea autocomplete="off" class="code_input" id="textareaCode" spellcheck="false"></textarea>
  225. <form autocomplete="on" style="margin:0px;display:none;">
  226. <input type="text" name="code" id="code">
  227. <input type="hidden" id="bt" name="bt">
  228. </form>
  229. </div>
  230. </div>
  231. </div>
  232. <div class="iframecontainer">
  233. <div class="iframe">
  234. <div style="overflow:auto;">
  235. <div class="headerText">Result:</div>
  236. </div>
  237. <div id="iframewrapper" class="iframewrapper">
  238.  
  239. </div>
  240. </div>
  241. </div>
  242. <div class="footerText">Try it Yourself - © <a href="http://www.w3schools.com">w3schools.com</a></div>
  243. </div>
  244. <script>submitTryit()</script>
  245.  
  246.  
  247. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment