我的网页上有一个按钮。一旦我点击这个按钮,弹出窗口就会出现一些文字。在这里,我需要在弹出显示另一个HTML页面 我已经给了我下面的代码,请帮我使用Javascript弹出显示页面
<!doctype html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,500">
<link type="text/css" rel="stylesheet" href="popModal.css">
</head>
<body>
<button id="notifyModal_ex1" class="btn btn-primary">Example</button>
<div id="content2" style="display:none">
ghjgh
</div>
<script src="popModal.js"></script>
<script>
$(function(){
$('#notifyModal_ex1').click(function(){
$('#content2').notifyModal({
duration : 1500,
placement : 'center',
overlay : true,
type : 'notify',
onClose : function() {}
});
});
});
</script>
</body>
</html>
你可以按'f12'来打开开发者控制台,然后进入'控制台'选项卡,让我们知道它在那里说了什么。可能会有一个错误,这会给我们更多的见解。 –