Scroll to top

How to use inner html value or data in php from javascript(innerHTML)?

 use inner html value or data in php from javascript(innerHTML)?

<html>
<body>

<p id=”demo”>use inner html value in php(innerhtml)</p>

<script>

  var jassi = document.getElementById(“demo”).innerHTML;
  //document.write(jassi);

</script>

<?php
$jassi = ‘<script>document.write(jassi);</script>’;
echo $jassi;

?>
</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *