浏览器通过alert(),confirm(),prompt()可以调用系统对话框向用户显示信息。confirmif(confirm("are you sure?")) { alert("I'm so glad you're sure"); }else{ alert("I'm sorry to hear you're not sure"); }prompt()varreuslt = prompt("what's your name","");if(reuslt !=null) { alert("welcome"+reuslt); } //显示“打印”对话框window.print(); //显示“查找”对话框window.find();