1

在我的 HTML5 视频结束后,我无法自动关闭 shadowbox 窗口!

难道我做错了什么?请帮忙!

<script type="text/javascript">
Shadowbox.init({
    // skip the automatic setup 
    skipSetup: true
});

window.onload = function() {
    // open ASA the window loads
    Shadowbox.open({
        content:    '<video width="576" height="324" autoplay id="trailer"> <source src="../media/trailer.mp4" type="video/mp4"> Your browser does not support the video tag. </video>',
        player:     "html",
        height:     329,
        width:      581
    });
    document.getElementById('trailer').addEventListener('ended',myHandler,false);
    function myHandler(e) {
        if(!e) { e = window.event; }
        Shadowbox.close(); 
};


    }</script>
4

0 回答 0