Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////
- <!DOCTYPE html>
- <html lang="en-US">
- <head>
- <title>Tryit Editor v2.6</title>
- var node = document.getElementsByTagName('script')[0];
- alert(node.src);
- })();
- </script>
- <script type='text/javascript'>
- // GPT slots
- var gptAdSlots = [];
- googletag.cmd.push(function() {
- var leaderMapping = googletag.sizeMapping().
- // Mobile ad
- addSize([0, 0], [320, 50]).
- // Vertical Tablet ad
- addSize([468, 0], [468, 60]).
- // Horizontal Tablet
- addSize([728, 0], [728, 90]).
- // Desktop and bigger ad
- // addSize([970, 0], [[728, 90], [970, 90]]).build();
- addSize([970, 0], [728, 90]).build();
- // gptAdSlots[0] = googletag.defineSlot('/16833175/TryitLeaderboard', [[728, 90], [970, 90]], 'div-gpt-ad-1428407818244-0').
- gptAdSlots[0] = googletag.defineSlot('/16833175/TryitLeaderboard', [728, 90], 'div-gpt-ad-1428407818244-0').
- defineSizeMapping(leaderMapping).addService(googletag.pubads());
- googletag.pubads().setTargeting("content","tryhtml");
- googletag.enableServices();
- });
- </script>
- <script>
- if (window.addEventListener) {
- window.addEventListener("resize", browserResize);
- } else if (window.attachEvent) {
- window.attachEvent("onresize", browserResize);
- }
- var xbeforeResize = window.innerWidth;
- function browserResize() {
- var afterResize = window.innerWidth;
- if ((xbeforeResize < (970) && afterResize >= (970)) || (xbeforeResize >= (970) && afterResize < (970)) ||
- (xbeforeResize < (728) && afterResize >= (728)) || (xbeforeResize >= (728) && afterResize < (728)) ||
- (xbeforeResize < (468) && afterResize >= (468)) ||(xbeforeResize >= (468) && afterResize < (468))) {
- xbeforeResize = afterResize;
- googletag.cmd.push(function() {
- googletag.pubads().refresh([gptAdSlots[0]]);
- });
- }
- }
- </script>
- <script type="text/javascript">
- function submitTryit() {
- var text = document.getElementById("textareaCode").value;
- var ifr = document.createElement("iframe");
- ifr.setAttribute("frameborder", "0");
- ifr.setAttribute("id", "iframeResult");
- document.getElementById("iframewrapper").innerHTML = "";
- document.getElementById("iframewrapper").appendChild(ifr);
- var ifrw = (ifr.contentWindow) ? ifr.contentWindow : (ifr.contentDocument.document) ? ifr.contentDocument.document : ifr.contentDocument;
- ifrw.document.open();
- ifrw.document.write(text);
- ifrw.document.close();
- }
- </script>
- <style>
- </style>
- </head>
- <body>
- <div id='tryitLeaderboard'>
- <!-- TryitLeaderboard -->
- <div id='div-gpt-ad-1428407818244-0'>
- <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1428407818244-0'); });</script>
- </div>
- </div>
- <div class="container">
- <div class="textareacontainer">
- <div class="textarea">
- <div style="overflow:auto;">
- <div class="headerText">Edit This Code:</div>
- <button class="seeResult" type="button" onclick="submitTryit()">See Result »</button>
- </div>
- <div class="textareawrapper">
- <textarea autocomplete="off" class="code_input" id="textareaCode" wrap="logical" spellcheck="false"><!DOCTYPE html>
- <html>
- <head>
- <title>Page Title</title>
- </head>
- <body>
- <h1>This is a Heading</h1>
- <p>This is a paragraph.</p>
- </body>
- </html>
- </textarea>
- <form autocomplete="off" style="margin:0px;display:none;">
- <input type="hidden" name="code" id="code" />
- <input type="hidden" id="bt" name="bt" />
- </form>
- </div>
- </div>
- </div>
- <div class="iframecontainer">
- <div class="iframe">
- <div style="overflow:auto;">
- <div class="headerText">Result:</div>
- </div>
- <div id="iframewrapper" class="iframewrapper">
- </div>
- </div>
- </div>
- <div class="footerText">Try it Yourself - © <a href="http://www.w3schools.com">w3schools.com</a></div>
- </div>
- <script>submitTryit()</script>
- </body>
- </html>
- //////
- <script type="text/javascript">
- function submitTryit() {
- var text = document.getElementById("textareaCode").value;
- var ifr = document.createElement("iframe");
- ifr.setAttribute("frameborder", "0");
- ifr.setAttribute("id", "iframeResult");
- document.getElementById("iframewrapper").innerHTML = "";
- document.getElementById("iframewrapper").appendChild(ifr);
- var ifrw = (ifr.contentWindow) ? ifr.contentWindow : (ifr.contentDocument.document) ? ifr.contentDocument.document : ifr.contentDocument;
- ifrw.document.open();
- ifrw.document.write(text);
- ifrw.document.close();
- }
- </script>
- <style>
- </style>
- </head>
- <body>
- <div id="tryitLeaderboard">
- <!-- TryitLeaderboard -->
- <div id="div-gpt-ad-1428407818244-0">
- <script type="text/javascript">googletag.cmd.push(function() { googletag.display('div-gpt-ad-1428407818244-0'); });</script>
- </div>
- </div>
- <div class="container">
- <div class="textareacontainer">
- <div class="textarea">
- <div style="overflow:auto;">
- <div class="headerText">Edit This Code:</div>
- <button class="seeResult" type="button" onclick="submitTryit()">See Result »</button>
- </div>
- <div class="textareawrapper">
- <textarea autocomplete="off" class="code_input" id="textareaCode" wrap="logical" spellcheck="false"></textarea>
- <form autocomplete="off" style="margin:0px;display:none;">
- <input type="hidden" name="code" id="code">
- <input type="hidden" id="bt" name="bt">
- </form>
- </div>
- </div>
- </div>
- <div class="iframecontainer">
- <div class="iframe">
- <div style="overflow:auto;">
- <div class="headerText">Result:</div>
- </div>
- <div id="iframewrapper" class="iframewrapper">
- </div>
- </div>
- </div>
- <div class="footerText">Try it Yourself - © <a href="http://www.w3schools.com">w3schools.com</a></div>
- </div>
- <script>submitTryit()</script>
- </body></html>
- /////
- <script type="text/javascript">
- function submitTryit() {
- var text = document.getElementById("textareaCode").value;
- var ifr = document.createElement("iframe");
- ifr.setAttribute("frameborder", "0");
- ifr.setAttribute("id", "iframeResult");
- document.getElementById("iframewrapper").innerHTML = "";
- document.getElementById("iframewrapper").appendChild(ifr);
- var ifrw = (ifr.contentWindow) ? ifr.contentWindow : (ifr.contentDocument.document) ? ifr.contentDocument.document : ifr.contentDocument;
- ifrw.document.open();
- ifrw.document.write(text);
- ifrw.document.close();
- }
- </script>
- <style>
- </style>
- </head>
- <body>
- <div id="tryitLeaderboard">
- <!-- TryitLeaderboard -->
- <div id="div-gpt-ad-1428407818244-0">
- <script type="text/javascript">googletag.cmd.push(function() { googletag.display('div-gpt-ad-1428407818244-0'); });</script>
- </div>
- </div>
- <div class="container">
- <div class="textareacontainer">
- <div class="textarea">
- <div style="overflow:none;">
- <div class="headerText">Edit This Code:</div>
- <button class="seeResult" type="button" onclick="submitTryit()">See Result »</button>
- </div>
- <div class="textareawrapper">
- <textarea autocomplete="off" class="code_input" id="textareaCode" spellcheck="false"></textarea>
- <form autocomplete="on" style="margin:0px;display:none;">
- <input type="text" name="code" id="code">
- <input type="hidden" id="bt" name="bt">
- </form>
- </div>
- </div>
- </div>
- <div class="iframecontainer">
- <div class="iframe">
- <div style="overflow:auto;">
- <div class="headerText">Result:</div>
- </div>
- <div id="iframewrapper" class="iframewrapper">
- </div>
- </div>
- </div>
- <div class="footerText">Try it Yourself - © <a href="http://www.w3schools.com">w3schools.com</a></div>
- </div>
- <script>submitTryit()</script>
- </body></html>
Advertisement
Add Comment
Please, Sign In to add comment