<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>001_helloWorld</title>
<meta name="author" content="Administrator" />
<!-- Date: 2015-07-13 -->
<script type="text/javascript" charset="UTF-8">
// helloworld
//浏览器对象window,弹出警告框提示alert中的内容
window.alert('hello javaScript !!!');
//文档对象,输出到页面
document.write('this is my first program');
//把内容打印到控制台
console.info('hello js.......');
</script>
<!--外部引入文件,在这个script内部,不能写js代码了-->
<!--解析顺序,从上到下变解析变执行-->
<!--如果想让后面的script代码先执行需要用defer这个属性
defer:script代码段先引入进来,然后延迟到页面加载完成之后 (相当于window.onload)
-->
<script type="text/javascript" charset="UTF-8" defer="defer" src="../commons/001.js"></script>
<script type="text/javascript" charset="UTF-8">
alert('i am inner');
</script>
</head>
<body>
</body>
</html>
JS_001
最新推荐文章于 2019-12-04 09:45:14 发布