javascript - PHP get contents of a div, and echo the div contents in same page -


hello , thank help. i'd similar website.

simply loading of page, in php, take content of div.

and display anywhere on page.

store in variable $texte1 contents of the div id texte-1

<?php $texte1 = get_contents_div('text-1'); ?> 

and put content of div in page

<?php echo ($texte1);?> 

tank friends sorry bad english

this how can in javascript:

<script> (function(){      var divcontent= document.getelementbyid("text-1").html(); //get div content       document.getelementsbytagname("body").append(divcontent); //add body })(); </script> 

Comments

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -