<html>
<script src = "script.js" language = "javascript">
</script>
</html>
优点:单独修改文件就可以改变多处引用此脚本的地方。
3.将脚本程序代码作为属性值
例如:<a href = "javascript:alert(new Date());">javascript</a>
<input type = button value = test>
________Tips:Java 在 JavaScript 中可以用的关键字
abstract boolean break break byte case catch char class const continue default do double else extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try var void while with