由于javascript是按照顺序执行的。因为其放置位置应该在被获取元素的前面。
如此:
<!doctype html><!--告知该文档是HTML5文档-->
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<link href="css/style.css" rel="stylesheet" />
<script src="js/jquery.min.js"></script>
</head>
放置于<head>之间,<body>之前