asp.net form opens and closes of output js

  • 2020-05-12 02:27:38
  • OfStack


// Open a new form  
Response.Redirect("WebMain.aspx"); 
// The pop-up 1 A new form  
Response.Write("<script>window.open(\"WebMain.aspx\")</script>") 
// The pop-up 1 A prompt box with an ok button only  
Response.Write("<script>alert(\" Wrong username or password \");</script>"); 
// Close the form without prompting  
Response.Write("<script>window.opener=null;window.close();</script>"); 
// Closing window prompt 1 Pieces of information  
Response.Write("<script>window.close();</script>"); 
// Closing the form prompts for two messages  
Response.Write("<script>if(confirm(\" Are you sure to quit? \")==true){window.close();}</script>");

Related articles: