1 <HTML>
2 <HEAD>
3 <TITLE> php调用js文件的好办法</TITLE>
4 </HEAD>
5 <BODY>
6 <scrīpt language='javascrīpt' type='text/javascrīpt' src='test.php'></scrīpt>
7 <scrīpt>
8 ok("aaaaaa!");
9 </scrīpt>
10 </BODY>
11 </HTML>
test.php
1 <?php
2 echo "
3 function ok(msg){
4 alert(msg);
5 }
6 ";
7 ?>