result=window.confirm('You about to do something, click OK to proceed or Cancel.'); if (result==true) { alert("you clicked yes") }