09-27-2010, 02:35 AM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Feb 2008
Posts: 107
Thanks: 3
|
How to use variable in javascript funtion ?
I want to echo the variable when I use test(); fuction. I meanwhen I use the variable with this function like test(john) , how to use it in that php snippet. Anyone knows ?
PHP Code:
<script type="text/javascript"> function test(){ document.getElementById("php_code").innerHTML=" <?php echo "hello"; ?> "; } </script>
|
|
|