JavaScript:改变 HTML 样式
<!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" />
</head>
<body>
<div class="container"style="padding:50px">
<h3 id="demo">JavaScript:改变 HTML 样式</h3>
<hr />
<button class="btn btn-primary"onclick="myFunction()">点击按钮</button>
<script>
function myFunction() {
document.getElementById("demo").style.color = "#fff000";
}
</script>
</div>
</body>
</html>