語言

HtmlWindow.Prompt(String, String) 方法

定義

顯示一個對話框,顯示訊息和文字框給使用者。

public:
 System::String ^ Prompt(System::String ^ message, System::String ^ defaultInputValue);
public string Prompt(string message, string defaultInputValue);
public string? Prompt(string message, string defaultInputValue);
member this.Prompt : string * string -> string
Public Function Prompt (message As String, defaultInputValue As String) As String

參數

message
String

要顯示給使用者的訊息。

defaultInputValue
String

文字框中顯示的預設值。

傳回

A String 代表使用者輸入的文字。

備註

Prompt 提供一種快速且簡便的方式,讓使用者能取得簡單的文字輸入。

適用於

另請參閱