日期:2014-05-16 浏览次数:20434 次
<!DOCTYPE HTML> <html> <head> <meta charset="gb2312" /> <title></title> <style> </style> </head> <body> <script> var fn = function(x){ alert(x); } fn(123) </script> </body> </html>
------解决方案--------------------
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
</head>
<title>js-test</title>
<body>
<script type="text/javascript" src="js.js"></script>
</body>
</html>
//js.js内容
document.onload=(function()
{
document.write('<h1>Hello,Javascript!</h1>');
})();