Поделиться через


SearchBox.placeholderText property

[SearchBox is no longer available for use as of Windows 10. Instead, use AutoSuggestBox. ]

Gets or sets the placeholder text for the SearchBox. This text is displayed if there is no other text in the input box.

Syntax

<div 
    data-win-control="WinJS.UI.SearchBox" 
    data-win-options="{ placeholderText : value}" >
</div>
var placeholderText = searchBox.placeholderText;
searchBox.placeholderText = placeholderText;

Property value

Type: String

The placeholder text for the SearchBox. The maximum length is 128 characters.

Requirements

Minimum WinJS version

WinJS 3.0

Namespace

WinJS.UI

See also

SearchBox