我想在我的 asp.net 应用程序上显示错误消息。此消息是警告消息,这就是我的做法:
CmdCalcInvoke.Attributes["onclick"] = "return confirm('Are you sure you want to calculate the certification? WARNING: If the quarter has not finished, all the partners status will change')";
上面的代码工作正常。 CmdCalcInvoke
是一个htmlInputButton
。这是消息框显示的消息;
Are you sure you want to calculate the certification? WARNING: If the quarter has not finished, all the partners status will change
我想做的是显示此消息,但想通过将其加粗或以红色显示该单词来突出显示警告单词,这可以完成吗???,不记得看到一个消息框这个特点,但我想我会问以防万一
欢迎任何建议
最佳答案
如果您不使用默认警报框,则可以。尝试使用 javascript 模态窗口,它只是普通的 div 标记,您可以控制其样式。查看 jquery 的 blockui(还有很多其他的)
关于JavaScript消息框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/91434/