【发布时间】:2021-09-14 06:42:49
【问题描述】:
我正在开发 Google 网络应用(使用 Google 表格数据)
我想在鼠标悬停在按钮上时显示数据,但我在按钮上获取数据而不是悬停显示。
我哪里做错了?
<head>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<script>
function onSuccess(cellData) {
var div = document.getElementById('output');
div.innerHTML = cellData;
}
google.script.run.withSuccessHandler(onSuccess)
.callMe();
</script>
<script>
$(document).ready(function(){
$('[data-bs-toggle="popover"]').popover();
});
</script>
<span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="output">
<button class="btn btn-primary" id="output" type="button" disabled>info</button>
</span>
【问题讨论】:
标签: javascript html css bootstrap-4 web-applications