<HTML>
<HEAD>
<TITLE> php调用js文件的好办法</TITLE>
</HEAD>
<BODY>
<scrīpt language=''javascrīpt'' type=''text/javascrīpt'' src=''test.php''></scrīpt>
<scrīpt>
ok("aaaaaa!");
</scrīpt>
</BODY>
</HTML>
test.php:
<?php
echo "
function ok(msg){
alert(msg);
}
";
?>
时间: 2024-11-03 23:56:30