如何生成弹出窗口

如何生成弹出窗口

本文介绍了如何生成弹出窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <   asp:HyperLink     ID   =  lnkforgetpwd     href   =  javascript:openPopup1('ForgetPassword.aspx')    runat   =  server > 忘记密码

函数openPopup1(strOpen){
open(strOpen,Forgot Pop UP,
status = 1,width = 400,height = 200,top = 100,左= 300);
}
< / 脚本 >

ScriptManager.RegisterStartupScript(this.Page,this.GetType(),tmp,< script 类型 =' text / javascript' > validatePopup(); < / script > ,false);

函数validatePopup()
{
var txt;
var r = confirm(您的密码已发送到您的邮箱);
if(r == true){
this.close();
} else {
txt =你按下取消!;
}

}
解决方案

<asp:HyperLink ID="lnkforgetpwd" href="javascript:openPopup1('ForgetPassword.aspx')" runat="server">Forgot password

function openPopup1(strOpen) {
            open(strOpen, "Forgot Pop UP",
         "status=1, width=400, height=200, top=100, left=300");
        }
</script>

ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "<script type='text/javascript'>validatePopup();</script>", false);

function validatePopup()
{
  var txt;
    var r = confirm("your password is sent to your mail");
    if (r == true) {
        this.close();
    } else {
        txt = "You pressed Cancel!";
    }

}
解决方案


这篇关于如何生成弹出窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 03:52