写到控制台

<!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>写到控制台</h3>
<hr />
<button class="btn btn-success"onclick="myFunction()">尝试一下</button>
<script>
function myFunction() {
var a = 5;
var b = 10;
var c = a + b;
console.log(c);
}
</script>
</div>
</body>
</html>

posted @ 2016-01-17 10:54  melao2006  阅读(110)  评论(0编辑  收藏  举报