使用javascript打开窗口模式引导,而不使用jQuery?
我想打开Bootstrap3.3.7(我不使用v4)窗口模式。我使用谷歌地图API,我想,当我点击我的标记时,不要打开API的infoWindo,而是打开窗口模式。你能帮助我吗? 我在jQuery中找到了答案,但在没有jQuery的javascript中找不到答案。谢谢你的帮助。对不起,我英语不好 在这个环境中,如何使用id='myModal'调用我的窗口模式使用javascript打开窗口模式引导,而不使用jQuery?,javascript,google-maps-api-3,bootstrap-modal,Javascript,Google Maps Api 3,Bootstrap Modal,我想打开Bootstrap3.3.7(我不使用v4)窗口模式。我使用谷歌地图API,我想,当我点击我的标记时,不要打开API的infoWindo,而是打开窗口模式。你能帮助我吗? 我在jQuery中找到了答案,但在没有jQuery的javascript中找不到答案。谢谢你的帮助。对不起,我英语不好 在这个环境中,如何使用id='myModal'调用我的窗口模式 myMarker.addListener('click', function () { //infowindo
myMarker.addListener('click', function () {
//infowindow.open(map, myMarker);
});
html
&时代;
提特利
接近
为什么不把jQuery的答案转换成vanilla js?@Cory hi谢谢你的回答。因为在我的项目中,我只使用javascript,在纯javascript中,没有框架,没有库等等,但是jQuery解析为纯javascript。。它只是一个javascript库,因此如果您发布jQuery解决方案,它所做的一切都可以转换为纯javascript(即vanilla js),我相信您会更快找到答案。@Prokzy Hi感谢您的回答。我会尝试,但我不确定,但为什么不!?看看这是否有用<代码>文档.getElementById('#myModal').classList.add('show')
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="exampleModalLabel">Titlee</h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<input type="submit" class="btn btn-primary" Value='Valider '>
</div>
</div>
</div>
</div>