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# - SharpDX Toolkit models rendering inside out -

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