<!DOCTYPE html>
<html>
<head>
<title>Bootstrap</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" charset="UTF-8" >
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="bootstrap/js/jquery-1.11.1.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
<script src="bootstrap/js/html5shiv.js"></script>
<script src="bootstrap/js/respond.min.js"></script>
<![endif]-->
<style type="text/css">
body{margin-top:80px;}
</style>
<script type="text/javascript">
$(document).ready(function(){
$("button").eq(0).tooltip({
title:"标题",
placement:"bottom"
});
$("button").eq(3).click(function(){
$("button").eq(0).tooltip("show");
});
});
</script>
</head>
<body>
<button class="btn btn-default">button</button>
<button class="btn btn-default">button</button>
<button class="btn btn-default">button</button>
<button class="btn btn-default">button</button>
</body>
</html>
转载于:https://www.cnblogs.com/Oraice/p/5009383.html