html如何调用两个JS

JavaScript010

html如何调用两个JS,第1张

调用两次就行了,比如你有两个文件,one.js,two.js。那你就这样写

<script src="one.js" language="javascript" type="text/javascript"></script>

<script src="two.js" language="javascript" type="text/javascript"></script>

它们都在同一个目录下

用两个script标签即可引用两个js

<html>

<script type="text/javascript">

//具体内容

</script>

<script type="text/javascript">

//具体内容

</script>

</html>