1:在页面中直接嵌入JavaScript<script language="javascript">..........</script>2:链接外部JavaScript<script language="javascript" src="...../xx.js"/>