daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Jul 19th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <body>
  3.     <div class="pagewrapper">
  4.         <div class="page">
  5.             <iframe id="TabContentIframe" src="/MyTestWebsite4/TabContent/Details/8"></iframe>
  6.             <iframe id="TabContentIframe" src="/MyTestWebsite4/TabContent/Details/8"></iframe>
  7.             <iframe id="TabContentIframe" src="/MyTestWebsite4/TabContent/Details/8"></iframe>
  8.         </div>
  9.     </div>
  10. </body>
  11. </html>
  12.    
  13. <html>
  14. <body>
  15.     <div class="pagewrapper">
  16.         <div class="DivIWant">
  17.             <iframe id="MainContentIframe" src="/MyTestWebsite4/MainContent/Details/8"></iframe>
  18.         </div>
  19.     </div>
  20. </body>
  21. </html>
  22.    
  23. <html>
  24. <body>
  25.     <div class="pagewrapper">
  26.         <div iD = "BtnIPressed">
  27.         </div>
  28.     </div>
  29. </body>
  30. </html>
  31.    
  32. alert(parent.parent.getElementById("DivIWant").innerHTML)
  33.    
  34. alert(parent.getElementById("DivIWant").innerHTML)
  35.    
  36. var par = null;
  37. var div = null;
  38. while(par!==window){
  39.     par = par.parent;
  40.     var div = par.getElementById("DivIWant")
  41.     if(div){      
  42.          break;
  43.     }
  44. }
  45. if(div){
  46.     alert(div.innerHTML);
  47. }
  48.    
  49. window.top.document.getElementById("DivIWant");
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top