共用方式為


WinJS.Utilities.id function

Returns a collection with zero or one elements matching the specified id.

Syntax

var queryCollection = WinJS.Utilities.id(id);

Parameters

  • id
    Type: string

    The ID of the element (or elements).

Return value

Type: QueryCollection

A collection of elements whose id matches the id parameter.

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.Utilities