If you drop inline scripts (and it goes for inline styles too) and do like this, where you store functions (and rules) in a file of its own, you will be able to reuse it (them) like shown in below sample
File: one.html
<!DOCTYPE html>
<html>
<head>
<title>Page One</title>
<meta http-equiv='content-type' content='text/html; charset=UTF-8' />
<link rel='stylesheet' type='text/css' href='css/style.css' />
<script src="js/script.js"></script>
</head>
<body>
Page one content
</body>
</html>
File: two.html
<!DOCTYPE html>
<html>
<head>
<title>Page two</title>
<meta http-equiv='content-type' content='text/html; charset=UTF-8' />
<link rel='stylesheet' type='text/css' href='css/style.css' />
<script src="js/script.js"></script>
</head>
<body>
Page two content
</body>
</html>
File: style.css
body {
background: url(../images/bkg.png);
}
File: script.js
function modify(d) {
....
}
And have your files located like this in your folder
/www/one.html
/www/two.html
/www/js/script.js
/www/css/style.css
/www/images/bkg.png