Widget:Charsheet: различия между версиями

Материал из Ролевой сервер "tales.pw"
Перейти к:навигация, поиск
Строка 9: Строка 9:
 
         var div = document.getElementById("target");  
 
         var div = document.getElementById("target");  
 
         div.onload = function() {  
 
         div.onload = function() {  
 +
        alert("test");
 
             div.style.height =  
 
             div.style.height =  
 
               div.contentWindow.document.body.scrollHeight + 'px';  
 
               div.contentWindow.document.body.scrollHeight + 'px';  
 
         }  
 
         }  
−
        alert("test");
 
 
</script>
 
</script>

Версия 23:01, 25 июля 2019

<iframe

   src="https://test.tales.pw/"
   width="100%"
   frameborder='no'
   id="target"

></iframe>

<script type="text/javascript">

       var div = document.getElementById("target"); 
       div.onload = function() { 
       alert("test");
           div.style.height = 
             div.contentWindow.document.body.scrollHeight + 'px'; 
       } 

</script>