<head> 中的 JavaScript 函数
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8" />
<script src="jQuery/jquery-2.2.0.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<link rel="stylesheet"href="bootstrap/css/bootstrap.min.css" />
<script>
//function myFunction() {
// document.getElementById("demo").style.backgroundColor ="red"
//}
$(document).ready(function () {
$("#demo").click(function () {
document.getElementById("demo").style.backgroundColor = "red";
})
})
</script>
</head>
<body>
<div class="container"style="padding:50px">
<h3><head>中的 JavaScript</h3>
<hr />
<div onclick="myFunction()" id="demo">点击改变div元素的背景颜色</div>
</div>
</body>
</html>