confirm
The 'confirm' function displays a given message in a popup window, and asks for user confirmation;
'confirm'函数使用弹窗提示用户确认相关操作。
- Prototype: confirm(sMsg, sTitle);
- Parameters:
- sMsg: specifies a message to display;
需要显示的信息 - sTitle: specifies a title for the popup window;
弹窗的标题
- sMsg: specifies a message to display;
- Return Value: true on pressing 'Yes', or false on 'No';
- Example:
var bYes=confirm('Are you sure you want to delete the file?');