alert is a common method for window window objects in JavaScript script language. It only prompts a dialog box and does not cancel the function;
confirm is a method in the javascript language. A cancel and confirm dialog box pops up. Confirm returns true, cancel returns false; usually used with the button's Onclientclick event.