简体   繁体   English

在后面的代码中更改警报的字体

[英]change font of alert in behind code

I used below code for showing message in my page 我使用下面的代码在页面中显示消息

if (Session["Message"] != null)
    {

        //Write message code here
        this.ClientScript.RegisterStartupScript(GetType(), "Javascript", "<script>alert('insert succesfullyا')</script>");

        Session["Message"] = null;
    }

I want this message show with ( font=Tahoma font-size=12px and font-weight:bold ) 我想用( font=Tahoma font-size=12px and font-weight:bold )显示此消息

How I can do it? 我该怎么办?

Nope, its not possible. 不,这不可能。

You have to use custom alert box.Using jQuery, here are some: 您必须使用自定义警报框。使用jQuery,以下是一些方法:

This answer shows a way to have a confirm-like blocking dialog using jquery ui dialog 答案显示了一种使用jquery ui对话框进行类似于确认的阻止对话框的方法

Check this already answered SO Question: Change the styling of default alert box 选中此已回答的SO问题: 更改默认警报框的样式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM