1

我在我的网站上构建了一个 javascript 弹出窗口,但由于某种原因,这个弹出窗口没有使用包含的 javascript 文件。我怎样才能强制使用这些?

我已将这些文件包含在我的<head>

<script type="text/javascript" src="includes/js/form/jquery.validationEngine-nl.js" charset="utf-8"></script>
<script type="text/javascript" src="includes/js/form/jquery.validationEngine.js" charset="utf-8"></script>

这是我的 HTML:

<input type="submit" class="modal" value="Shout !" />

这是创建弹出窗口的 JS:

<script language="javascript">
    $(document).ready(function() {

    //Change these values to style your modal popup
    var align = 'center';       
    var top = 100;  
    var width = 500;    
    var padding = 10;
    var backgroundColor = '#FFFFFF';    
    var source = 'includes/php/popup.php';  
    var borderColor = '#333333'; 
    var borderWeight = 4;   
    var borderRadius = 5;   
    var fadeOutTime = 300;  
    var disableColor = '#666666'; 
    var disableOpacity = 40; 
    var loadingImage = 'lib/release-0.0.1/loading.gif'; 

    //This method initialises the modal popup
    $(".modal").click(function() {
        modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime, source, loadingImage);
    });

    //This method hides the popup when the escape key is pressed
    $(document).keyup(function(e) {
        if (e.keyCode == 27) {
        closePopup(fadeOutTime);
        }
    });     
});
</script>

即使我在includes/php/popup.php-file 中包含上述 JS 文件,它们也不能使用......我在这里监督什么?

modalPopup功能可以在这里找到。

4

0 回答 0