学习型 ASP/PHP/ASP.NET 主机 30元/年全能 ASP/PHP/ASP.NET 主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付
发新话题
打印

请教~~在弹出窗口时遇到问题

请教~~在弹出窗口时遇到问题

  在页面点击“确认”后----会弹出个新窗口即:一个BUTTON(确定)另一个为CANNL
这样的弹出页面应该怎么做??我按照教程上说的做了几次都没有成功,希望高手指点一下~最好能提供代码给我!!谢谢

TOP

window.confirm([sss]);
Happiness is a journey, not a destination. So... Work like you don\'t need money Love like you\'ve never been hurt And dance like no one\'s watching 才开的游戏论坛http://ronan.185.cc/,希望碰场

TOP

就是下面的代码?

TOP

以下是引用ronan在2005-1-20 19:37:13的发言: window.confirm([sss]);
ronan 就不能写一下注释和用法吗?我都没看懂。

TOP

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编辑过]

TOP

bConfirmed = window.confirm( [sMessage]) 就是弹出窗口取得一个bool变量。参数sMessage是表示弹出对话框中提示什么。

TOP

是消息框吗? 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); } }

九洲方除百尺冰,映秀又遭蛮牛耕。汽笛嘶鸣国旗半,哀伤尽处是重生。

治国就是治吏。礼义廉耻,国之四维。四维不张,国之不国。

TOP

knocker 你的也对,不过楼主要的好像不要这么麻烦,就是询问一下确定和否定,弹个框出来就完事。

TOP

发新话题