ASP .NET中的MessageBox [英] MessageBox in ASP .NET

查看:67
本文介绍了ASP .NET中的MessageBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,


谁能告诉我,如何使用JavaScript在网络上显示消息框?

我已经从Google找到了用于在网络上显示msgBox的代码.但是,它只是确认框,在其上显示确定"和取消"按钮..


我需要在JavaScript中使用YES和NO按钮在Web中显示一个消息框..

有没有可以显示的代码?








致以诚挚的问候,

Ragamaie

Hi Friends,


Can any one tell me, how to display a message box in web using JavaScript?

I already found code from Google for displaying msgBox in web. But, it is confirm box only which displays OK and CANCEL buttons on it..


I need to display a message box in web in JavaScript with YES and NO buttons..

Is there any code to display like that?








Thanks & Warm regards,

Ragamaie

推荐答案

您无法修改JavaScript的确认框.看一下jQuery选项.
http://projectshadowlight.org/jquery-easy-confirm-dialog/ [
You cannot modify confirm box of javascript. Take a look at jQuery options.
http://projectshadowlight.org/jquery-easy-confirm-dialog/[^]


plz参考:

http://theinfiniteloopblog.com/programming/jscript/custom-javascript-alert -and-confirm-dialog-boxes/ [
plz refer:

http://theinfiniteloopblog.com/programming/jscript/custom-javascript-alert-and-confirm-dialog-boxes/[^]


使用此:-
use this :-
public static void MessageBox(System.Web.UI.Page senderPage, string alertMsg, string alertKey)
      {
          string strScript = "<script language=JavaScript>alert('" +alertMsg + "')</script>";
          if (!(senderPage.IsStartupScriptRegistered(alertKey)))
              senderPage.RegisterStartupScript(alertKey, strScript);
      }




并使用三个参数从aspx.cs调用
试试这个.




and call from aspx.cs with Three parameter
try this.


这篇关于ASP .NET中的MessageBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆