HTML
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>对话框 - 光年(Light Year Admin)后台管理系统模板</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<meta name="keywords" content="LightYear,光年,后台模板,后台管理系统,光年HTML模板">
<meta name="description" content="LightYear是一个基于Bootstrap v3.3.7的后台管理系统的HTML模板。">
<meta name="author" content="yinqi">
<link href="http://lyear.itshubao.com/iframe/css/bootstrap.min.css" rel="stylesheet">
<link href="http://example.itshubao.com/demo/css/materialdesignicons.min.css" rel="stylesheet">
<!--对话框-->
<link rel="stylesheet" href="http://lyear.itshubao.com/iframe/js/jconfirm/jquery-confirm.min.css">
<link href="http://lyear.itshubao.com/iframe/css/style.min.css" rel="stylesheet">
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header"><h4>URL加载测试</h4></div>
<div class="card-body">
<p class="text-danger">在使用URL的时候,不能再URL对应的页面中导入于当前页面存在的jquery,这样会导致第二次打开时候报错。如当前页面,导入的页面同样有jquery,就无法第二次打开。当你将URL地址改成http://example.itshubao.com/test/test.html,就不会有这个问题。</p>
<div class="row">
<div class="col-md-4">
<button class="btn btn-primary btn-block example-p-7-1">URL加载测试</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="http://lyear.itshubao.com/iframe/js/jquery.min.js"></script>
<script type="text/javascript" src="http://lyear.itshubao.com/iframe/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://lyear.itshubao.com/iframe/js/perfect-scrollbar.min.js"></script>
<!--对话框-->
<script src="http://lyear.itshubao.com/iframe/js/jconfirm/jquery-confirm.min.js"></script>
</body>
</html>
JavaScript
$('.example-p-7-1').on('click', function() {
$.confirm({
content: 'URL:http://example.itshubao.com/tools.html', // 也可以采用url形式
animation: "zoom",
closeAnimation: "scale",
draggable: true,
type: "green",
columnClass: "col-md-8 col-md-offset-2",
title: false,
backgroundDismiss: false
});
});