
方法一:在head标签内引入JS文件
(推荐教程:html教程)
<html> <head> <script src="此处写你的js文件路径"></script> </head> <body> </body></html>
方法二:在body标签内写JS代码
<html> <head> </head> <body> <script type="text/javascript"> //在这里面写你的js代码 </script> </body></html
以上就是在html页面中加入js可以用什么方法的知识。速戳>>知识兔学习精品课!