JavaScript学习 (1)JavaScript的引入
javascript的引入
1.内部标签
<!-- 在script标签内写javascript代码 (一般放head头部或者body底部)-->
<script>
alert('hello,world');
</script>
2.外部引入
js文件夹下的qq.js
alert('hello,world');
test.html
<!-- 外部引入-->
<script src="js/qq.js" ></script>
<!-- 不用显示定义type,默认就是javascript-->
<script type="text/javascript"></script>