GET URL值以加载包含内容的弹出框

时间:2018-08-18 08:49:22

标签: jquery

需要帮助,为什么此代码不起作用我希望提交表单后在页面加载后显示一个弹出框 这些是我的代码

在script.js中

$(window).load(function(newSubscriber) {});

function newSubscriber() {
    var URL = $(location).attr('href');
    var GET_ARR = URL.split('/');
    if ($.inArray('?subscriber=yes', GET_ARR)) {

        $("#list-builder").delay(delay).fadeIn("fast", () => {
            $("#popup-box").fadeIn("fast", () => {});
        });
        $("#popup-box-content").html("<p style='text-align: center'>Thank you for subscribing to our mailing list!</p>");
    }
}

action.php

if ($stmt -> execute()) {
    header("Location:index.php?subscriber=yes");
}

html文件

<div id="list-builder"></div>
<div id="popup-box">
    <img src="assets/images/close.png" id="popup-close" />
    <div id="popup-box-content">
    </div>
</div>

1 个答案:

答案 0 :(得分:0)

这些有效!

[source,python]
----
>>> def echo(value=None):
 print("Execution starts when 'next()' is called for the first time.")
 try:
     while True:
         try:
             value = (yield value)
         except Exception as e:
----