decomposeURI
將統一資源識別碼( URI)拆解成其組成元件: hash
、host
、href
、pathname
、protocol
、search
和uriParams
。
函式簽章: DIL.tools.decomposeURI
函式引數
decomposeURI
接受:
uri {string}
: (選擇性) 包含URI的字串。 若未指定,則預設為document.location.href
。
並傳回:
{object}
:包含有效名稱和關鍵字的物件。
程式碼範例
getMetaTags
搜尋在網頁的中繼標籤中定義的特定內容,並在物件中傳回該資料。
函式簽章
函式簽章: DIL.tools.getMetaTags( 1 or more parameters)
函式引數
getMetaTags
接受要搜尋的一或多個名稱引數(字串型別)。 它會傳回由索引鍵值配對組成的物件。