这样的弹出页面应该怎么做??我按照教程上说的做了几次都没有成功,希望高手指点一下~最好能提供代码给我!!谢谢
confirm Method |
Internet Development Index |
Displays a confirmation dialog box that contains an optional message as well as OK and Cancel buttons.
Syntax
bConfirmed = window.confirm( [sMessage])
Parameters
sMessage Optional. String that specifies the message to display in the confirmation dialog box. If no value is provided, the dialog box does not contain a message.
Return Value
Boolean. Returns one of the following possible values:
true The user clicked the OK button. false The user clicked Cancel button.
Remarks
The title bar of the confirmation dialog box cannot be changed.
Standards Information
There is no public standard that applies to this method.
See Also
alert, prompt
[此贴子已经被作者于2005-1-23 11:36:27编辑过]
是消息框吗? using System; using System.Windows.Forms;
class MyMessageBox { public static void Main() { DialogResult m= MessageBox.Show("是不是这个样子?","消息框",MessageBoxButtons.OKCancel,MessageBoxIcon.Warning); if(m==DialogResult.OK) MessageBox.Show("OK!就是这里","消息框",MessageBoxButtons.OK,MessageBoxIcon.Warning); if(m==DialogResult.Cancel) MessageBox.Show("你单击了 取消 ","消息框",MessageBoxButtons.OK,MessageBoxIcon.Warning); } }