confirm--------------------------------------------------------------------------------DescriptionDisplays a Confirm dialog box with the specified message, and OK and Cancel buttons. Syntax
object.confirm([message])Parameter Description 
message  Optional. (String) String to display. Return ValueReturns TRUE if the user chooses OK, or FALSE if the user chooses Cancel. ResYou have no control over the dialog box title. Applies Towindow alert--------------------------------------------------------------------------------DescriptionDisplays an Alert dialog box with a message and an OK button. Syntax
object.alert([message])Parameter Description 
message  Optional. (String) String to display. Return ValueNo return value. ResThe title bar of the Alert dialog box cannot be changed. Applies Towindow 
prompt--------------------------------------------------------------------------------DescriptionDisplays a Prompt dialog box with a message and an input field. Syntax
object.prompt([message [, inputDefault]])Parameter Description 
message  Optional. (String) String to display. 
inputDefault  Optional. (String) String or integer that represents the default value of the input field. Return ValueReturns the value that the user types in. ResIf the inputDefault parameter is not supplied, the dialog box displays the value <undefined>. You have no control over the title of the prompt box. Applies Towindow 
手册上的,希望对你有用~

解决方案 »

  1.   

    object.confirm([message])
    仅仅最多一个参数么?真奇怪为什么老板让我写两个和三个参数的东东
      

  2.   

    window.confirm 参数就只有一个.显示提示框的信息.
    按确定,返回true; 按取消返回false.<script>
    var bln = window.confirm("确定吗?");
    alert(bln)
    </script>
    window.alert参数,只有一个,显示警告框的信息;
    无返回值.<script>
    window.alert("确定.")
    </script>window.prompt参数,有两个,
    第一个参数,显示提示输入框的信息.
    第二个参数,用于显示输入框的默认值.
    返回,用户输入的值.<script>
    var str = window.prompt("请输入密码","password")
    alert(str);
    </script>
      

  3.   

    多谢楼上各位,看来是我的老板糊涂了:)结帖
    hoho,我好像还给很多高人发了消息,在这里一并感谢!谢谢你们的关注!