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


Tooltip.innerHTML property

Gets or sets the HTML content of the Tooltip.

Syntax

<div data-win-control="WinJS.UI.Tooltip" data-win-options="{ innerHTML : value}" ></div>
var innerHTML = tooltip.innerHTML;
tooltip.innerHTML = innerHTML;

Property value

Type: String

The HTML content of the Tooltip.

Examples

This example creates a Tooltip for a button. It attaches the Tooltip directly to the button element by setting the data-win-control and data-win-options properties on the button.

<button data-win-control="WinJS.UI.Tooltip" data-win-options="{innerHTML: 'Submit your Order'}">
    Submit</button>

The next example creates a Tooltip for a hyperlink.

<span data-win-control="WinJS.UI.Tooltip" data-win-options="{innerHTML: 'Microsoft Corporation<br><span>www.microsoft.com</span>'}"
style="margin-left: 40px;"><a href="https://www.microsoft.com">Microsoft</a>
</span>

For the complete code, see the HTML Tooltip control sample.

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.UI

See also

Tooltip

HTML Tooltip control sample