0

我创建了一个简单的弹出窗口(模态的,带有时间延迟的页面加载)。那么关闭弹出页面后,我如何才能查看它而不是刷新页面?也许在我的网站左侧创建一个按钮?下面是我的代码,

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>ColorBox demo</title>
<link rel="stylesheet" href="http://www.jacklmoore.com/colorbox/example1/colorbox.css" />

</head>
<body>
<h1>Hello, there!</h1>
<h2>This is some content</h2>
<p>The popup will open in five seconds</p>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://www.jacklmoore.com/colorbox/jquery.colorbox.js"></script>
<script>
  function openColorBox(){
    $.colorbox({iframe:true, width:"80%", height:"80%", href:"https://stackoverflow.com/questions"});
  }
  
  setTimeout(openColorBox, 2000);
</script>


</body>
</html>
4

0 回答 0