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

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -