这里提供一个简单的多页面JavaScrip例子。
四个文件,about.html, index.html, main.js, util.js
==============================
about.html 内容
------------------------------------------------------------------------------------------------------------
<a href="index.html">Jump To index.html</a>
==============================
index.html 内容
------------------------------------------------------------------------------------------------------------
<html>
<head><title>INDEX</title></head><body>Hello Index!<br><a href="about.html">Jump To about.html</a><script src="util.js"></script><script src="main.js"></script></body></html>
==============================
main.js 内容
------------------------------------------------------------------------------------------------------------
var c = Add(100, 200);
document.write("<br>" + c);window.alert(c);==============================
util.js 内容
------------------------------------------------------------------------------------------------------------
function Add(a, b)
{ return a+b;}==============================