警报框出现在白色空白背景中 [英] alert box appears in white blank background

查看:155
本文介绍了警报框出现在白色空白背景中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网络应用程序中,如果密码错误,我已经编写了警告显示框的代码

 ScriptManager.RegisterClientScriptBlock(this,this.GetType(),alertMessage, alert('电子邮件或密码不正确。'),true); 



当警报框出现时它带有白色背景或者当我点击确定后它会像图像和文字一样干扰背景它恢复正常我试过了

 RegisterStartupScript 

无论我做什么都给出同样的问题请帮助解决这个错误。

谢谢。

解决方案

这只是您正在使用的任何浏览器的警报功能的功能,它不能改变了。如果你想要更多地控制盒子,你需要使用自定义的javascript模式框。 jQuery有一个作为其UI库的一部分,支持更高级别的自定义。



http://jqueryui.com/dialog/ [ ^ ]


使用以下代码



 Page.ClientScript.RegisterStartupScript ( this  .GetType(),  alert  alert('这是Melwyn Fernandes');); 


In my web application i have written the code for alert display box if password is wrong

ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Email or Password is Incorrect.')", true);


when alert box appears it comes with white background or it disturbs background like images and text when i have clicked ok it goes back to normal i have tried the

RegisterStartupScript

too whatever i do it gives same problem please help to solve this error.
Thank you.

解决方案

That is just the functionality of the "alert" feature of whatever browser you are using and it can't be changed. If you want more control of the box you'll need to use a custom javascript modal box. jQuery has one as part of their UI library that supports a greater level of customisation.

http://jqueryui.com/dialog/[^]


Use the below code

Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Hi This is Melwyn Fernandes');", true);


这篇关于警报框出现在白色空白背景中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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