我有三个文件.php,.html和.js。我怎样才能将它们全部三个结合起来,以便我可以在JavaScript中使用php中变量集的值?
答案 0 :(得分:0)
我必须通过.php扩展保存此文件
<html>
<head> </head>
<body>
<?php
// here I can write my php code ?> // I can end it any time to include some JS code here
<script> Some js code</script>
<?php // and start again to write some more php code
?>
</body>
</html>