我正在尝试在它自己的窗口中打开一个 javascript 应用程序。我创建了一个按钮并为其附加了一个 onclick 事件,但是当我单击它时没有任何反应。我通过警报进行故障排除,但这也没有启动。
在控制台中我得到错误:jquery.min.map 404 (Not Found) 但我总是得到它,所以我通常忽略它。
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="$1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>$2</title>
<link rel="stylesheet" href="css/main.css">
<script type="text/javascript" src="https://hosted.test.ca/kc/MD/SiteAssets/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://hosted.teste.ca/kc/MD/SiteAssets/jquery.SPServices-2013.01.min.js"></script>
<script type="text/javascript">
var $launch = $('#launchButton');
$launch.click(function(){
alert("opening ManagementDash");
var url = 'https://hosted.test.ca/kc/MD/SiteAssets/mgmtDash.html';
window.open(url,'ManagementDash','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=100%,height=100%');
return false;
});
</script>
</head>
<body>
<button id="launchButton" >Launch MDash</button>
</body>
</html>