< >

teilausiframeloeschen.php


Quell Code


 
<html>
  <head>
    <style>
    #wrapper{
    display:flex;
    }
iframe{
height:300px;
width:88%;
margin:6%;
}
#mitajax{
height:300px;
width:88%;
overflow:auto;
margin:6%;
}
.eins{
display:flex;
flex-direction:column;
flex:1;
}
h1{
text-align:center;
}
    </style>
         <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js'></script>   

    </head>
    
    <body>
    <div id="wrapper">
    <div class="eins">
    <h1>Original mit igrame geholt</h1>
<iframe src="testiframe.php"></iframe>
</div>
<div class="eins">
<h1>Mit Ajax geholt ohne den header</h1>
<div id="mitajax"></div>
</div>
</div>
<script>
          $.ajax({
                type: "POST",
                url: "testiframe.php",
                //data: {ich:ich,gelesenid:gelesenid},
                success: function(data){ 
               go1=data.split('<html>')[1].split('<header>')[0];   
            go=data.split('</header>')[1].split('</body>')[0];
 $('#mitajax').html(go1+go);
        //         location.reload();
                }
     
        });



</script>
    </body>
    </html>