Shadowbox弹出不起作用

时间:2015-05-23 07:55:36

标签: popupwindow shadowbox

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Title</title>

<!-- Set paramètres pour le shadowbox (CSS, JS? . . .) -->
<link rel="stylesheet" type="text/css" href="shadowbox.css">
<script type="text/javascript" src="shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init({
    // let's skip the automatic setup because we don't have any
    // properly configured link elements on the page
    skipSetup: true
});

window.onload = function() {
    // open a welcome message as soon as the window loads
    Shadowbox.open({
        content:    'https://www.google.co.nz/images/srpr/logo11w.png',
        player:     "img",
        title:      "Welcome",
        height:     350,
        width:      350
    });

};
</script>
</head>

<body>
<h1>Hello World</h1>
<a href="WELCOMEOFFER.jpg" rel="shadowbox" title="My Image">My Image</a>
</body>
</html>

以上代码无效,任何帮助都被接受。我正在尝试添加弹出窗口onLoad,但影子框没有工作onClick正在工作。

0 个答案:

没有答案