猿问

js设置信息显示5秒后再跳转页面,为什么信息还没显示,瞬间就跳转了

 (data=='reguser_ok1'){
                     el2=$.tips({
                         content:'注册成功,系统已发送注册邮件!',
                         stayTime:5000,
                         type:"success"
                     });

                       window.location.href="{url user/login}";
                                        }


守着星空守着你
浏览 575回答 1
1回答

一只斗牛犬

var time = 5000; el2=$.tips({ content:'注册成功,系统已发送注册邮件!', stayTime:time, type:"success" });//代码1                  setTimeout(function(){                                          window.location.href="{url user/login}";                                     },time);
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答