public static void ShowMessage(System.Web.UI.Page page,string msg)
{
       msg = msg.Replace("'", "\\'").Replace("\r\n", "\\r\\n").Replace("\"", @"\"""); //对单引号, 双引号,换行进行处理 以便在消息框中保留
    
    
      Page.ClientScript.RegisterStartUpScript(page.GetType(),Guid.NewGuid().ToString(),"alert('"+msg+"')",true) 
}    

 

相关文章:

  • 2021-06-14
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2022-03-04
  • 2022-12-23
  • 2022-02-26
  • 2022-12-23
猜你喜欢
  • 2022-02-08
  • 2021-10-13
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案