===================本地html=============================
经测试,运行本地html会弹出对话框,提示内容为:I come from PHP!
<script type="text/javascript" src="http://服务器/文件名.php?可加传递参数"></script>
<script type="text/javascript" >
alert(jsdata);
</script>
===================服务器php============================
$php_test='I come from PHP!';
echo "var jstext='$php_test';";
经测试,运行本地html会弹出对话框,提示内容为:I come from PHP!