简体   繁体   中英

How to open a dialog box in asp.net?

我正在asp.net中创建一个在线考试Web应用程序,我想在用户提交测试或填写用户信息和其他任务时单击按钮时打开构型消息框或警报消息框?

you can just plain javascript like this for an alert on the button: onclick="alert('hello')"

  • or for anything fancy I would seriously consider using jQuery dialogs for it. You define the content of the dialog in a hidden div on the page and use a script to attach the dialog to the div by id. Have a look at

http://docs.jquery.com/UI/Dialog

您可以通过javascript使用alert(message)函数显示任何消息

alert(message) or confirm(message) are useful javascript functions. Alert just shows the user a message, whereas confirm displays a confirmation box and allows you to get a boolean value back from the user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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