Funzione getHost() di WMLScript

La funzione getHost() restituisce l'host specificato nel parametro url.

Sintassi

n = URL.getHost(url)
Componente Descrizione
n Stringa restituita dalla funzione.
url Una stringa.

Esempio

var a = URL.getHost("http://www.codew3c.com/wml");
var b = URL.getHost("/wml/functions");

Risultato

a = "www.codew3c.com"
b = ""