Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 带有location.replace的弹出消息_Jquery_Ajax_Window - Fatal编程技术网

Jquery 带有location.replace的弹出消息

Jquery 带有location.replace的弹出消息,jquery,ajax,window,Jquery,Ajax,Window,我正在尝试使用以下行在注册时将用户重定向到某个页面: window.location.replace(value2); 其中value2是URL。我想附上一些信息,它显示为一个弹出窗口。 知道如何实现这一点吗?使用javascript确认: var r = confirm("Do you want to be redirected?!"); if (r == true) { window.location.replace(value2); } else { alert( 'Ok

我正在尝试使用以下行在注册时将用户重定向到某个页面:

window.location.replace(value2);
其中value2是URL。我想附上一些信息,它显示为一个弹出窗口。
知道如何实现这一点吗?

使用javascript确认:

var r = confirm("Do you want to be redirected?!");
if (r == true) {
    window.location.replace(value2);
} else {
    alert( 'Okay then, We will stay right here' );
}

请使用javascript确认:

var r = confirm("Do you want to be redirected?!");
if (r == true) {
    window.location.replace(value2);
} else {
    alert( 'Okay then, We will stay right here' );
}

请使用javascript确认:

var r = confirm("Do you want to be redirected?!");
if (r == true) {
    window.location.replace(value2);
} else {
    alert( 'Okay then, We will stay right here' );
}

请使用javascript确认:

var r = confirm("Do you want to be redirected?!");
if (r == true) {
    window.location.replace(value2);
} else {
    alert( 'Okay then, We will stay right here' );
}
像这样试试

var value2 = "samp2.php?success=Yes";
window.location.replace(value2);
在samp2.php中

把这个写在第一行

if(isset($_GET['success']) && $_GET['success'] == "Yes")
{
    print '<script type="text/javascript">';
    print 'window.onload = function(e){';
    print 'alert("Welcome to page 2")';
    print '};';
    print '</script>';
}
//header("refresh:1,url=samp.php"); // this is optional
if(设置($\u GET['success'])&&&$\u GET['success']==“是”)
{
打印“”;
打印'window.onload=function(e){';
打印“警告”(“欢迎访问第2页”);
打印“};”;
打印“”;
}
//标题(“刷新:1,url=samp.php”);//这是可选的
像这样试试

var value2 = "samp2.php?success=Yes";
window.location.replace(value2);
在samp2.php中

把这个写在第一行

if(isset($_GET['success']) && $_GET['success'] == "Yes")
{
    print '<script type="text/javascript">';
    print 'window.onload = function(e){';
    print 'alert("Welcome to page 2")';
    print '};';
    print '</script>';
}
//header("refresh:1,url=samp.php"); // this is optional
if(设置($\u GET['success'])&&&$\u GET['success']==“是”)
{
打印“”;
打印'window.onload=function(e){';
打印“警告”(“欢迎访问第2页”);
打印“};”;
打印“”;
}
//标题(“刷新:1,url=samp.php”);//这是可选的
像这样试试

var value2 = "samp2.php?success=Yes";
window.location.replace(value2);
在samp2.php中

把这个写在第一行

if(isset($_GET['success']) && $_GET['success'] == "Yes")
{
    print '<script type="text/javascript">';
    print 'window.onload = function(e){';
    print 'alert("Welcome to page 2")';
    print '};';
    print '</script>';
}
//header("refresh:1,url=samp.php"); // this is optional
if(设置($\u GET['success'])&&&$\u GET['success']==“是”)
{
打印“”;
打印'window.onload=function(e){';
打印“警告”(“欢迎访问第2页”);
打印“};”;
打印“”;
}
//标题(“刷新:1,url=samp.php”);//这是可选的
像这样试试

var value2 = "samp2.php?success=Yes";
window.location.replace(value2);
在samp2.php中

把这个写在第一行

if(isset($_GET['success']) && $_GET['success'] == "Yes")
{
    print '<script type="text/javascript">';
    print 'window.onload = function(e){';
    print 'alert("Welcome to page 2")';
    print '};';
    print '</script>';
}
//header("refresh:1,url=samp.php"); // this is optional
if(设置($\u GET['success'])&&&$\u GET['success']==“是”)
{
打印“”;
打印'window.onload=function(e){';
打印“警告”(“欢迎访问第2页”);
打印“};”;
打印“”;
}
//标题(“刷新:1,url=samp.php”);//这是可选的

在重定向时向URL添加GET参数

var url= actualURL+'?message=1';
window.location.replace(url);
您可以找到如何从URL检索get参数

在接收页面上,您可以检查
message
参数的值,并显示来自JavaScript的适当消息


通过这种方式,您可以在不更改服务器端代码的情况下执行此操作。

在重定向时向URL添加GET参数

var url= actualURL+'?message=1';
window.location.replace(url);
您可以找到如何从URL检索get参数

在接收页面上,您可以检查
message
参数的值,并显示来自JavaScript的适当消息


通过这种方式,您可以在不更改服务器端代码的情况下执行此操作。

在重定向时向URL添加GET参数

var url= actualURL+'?message=1';
window.location.replace(url);
您可以找到如何从URL检索get参数

在接收页面上,您可以检查
message
参数的值,并显示来自JavaScript的适当消息


通过这种方式,您可以在不更改服务器端代码的情况下执行此操作。

在重定向时向URL添加GET参数

var url= actualURL+'?message=1';
window.location.replace(url);
您可以找到如何从URL检索get参数

在接收页面上,您可以检查
message
参数的值,并显示来自JavaScript的适当消息


通过这种方式,您可以在不更改服务器端代码的情况下执行此操作。

只需尝试在其之前添加
alert()
。此警报在重定向之前显示。我需要它出现在下一页的后面。只需在url中传递一个伪参数,然后在下一页中检查url参数和显示消息只需尝试在它之前添加
alert()
。重定向之前会出现警报。我需要它出现在下一页的后面。只需在url中传递一个伪参数,然后在下一页中检查url参数和显示消息只需尝试在它之前添加
alert()
。重定向之前会出现警报。我需要它出现在下一页的后面。只需在url中传递一个伪参数,然后在下一页中检查url参数和显示消息只需尝试在它之前添加
alert()
。重定向之前会出现警报。我需要它出现在下一页的后面。只需在url中传递一个伪参数,然后在下一页检查url参数并显示消息。场景如下:在第1页上按下按钮->重定向->登录页2,并显示消息“欢迎访问第2页”。上面的示例只会在同一页上发出警报,不需要,然后你需要按照奎师那说的去做。一个站点上的javascript不能将javascript传递给任何其他站点。将value2参数设置为例如:value2=“将显示消息”;然后在站点2上,制作一个javascript,检查是否设置了get参数消息,如果设置了,则使用其内容发出警报。场景如下:在页面1上按下按钮->重定向->登录页面2,并显示消息“欢迎访问页面2”。上面的示例只会在同一页面上发出警报,而不需要,然后你需要按照奎师那说的去做。一个站点上的javascript不能将javascript传递给任何其他站点。将value2参数设置为例如:value2=“将显示消息”;然后在站点2上,制作一个javascript,检查是否设置了get参数消息,如果设置了,则使用其内容发出警报。场景如下:在页面1上按下按钮->重定向->登录页面2,并显示消息“欢迎访问页面2”。上面的示例只会在同一页面上发出警报,而不需要,然后你需要按照奎师那说的去做。一个站点上的javascript不能将javascript传递给任何其他站点。将value2参数设置为例如:value2=“将显示消息”;然后在站点2上,制作一个javascript,检查是否设置了get参数消息,如果设置了,则使用其内容发出警报。场景如下:在页面1上按下按钮->重定向->登录页面2,并显示消息“欢迎访问页面2”。上面的示例只会在同一页面上发出警报,而不需要,然后你需要按照奎师那说的去做。一个站点上的javascript不能将javascript传递给任何其他站点。将value2参数设置为例如:value2=“将显示消息”;然后在站点2上,生成一个javascript,检查get参数消息是否已设置,如果已设置,则使用其内容发出警报。