PHP variable to Javascript variable: 复制代码 代码如下: <BR>jsvar = <?php echo $myvar; ?>; <BR>document.write(jsvar); // Test to see if its prints 10: <BR> Form variable to Javascript variable: 复制代码 代码如下: <BR>jsvar = document.myform4.formvar.value; <BR>document.write(jsvar) // test <BR> PHP variable to Form variable: 复制代码 代码如下: // PHP code inside HTML!! Javascript variable to Form variable: 复制代码 代码如下: <BR>jsvar=10; <BR>document.myform3.formvar.value = jsvar; <BR>