WMLScript getHost() 函数

getHost() 函数返回在 url 参数中规定的主机。

语法
  1. n = URL.getHost(url)
成分描述
n从函数返回的字符串。
url一个字符串。
例子
  1. var a = URL.getHost("https://cankaoshouce.com/wmlscript/wmlscript-course.html");
  2. var b = URL.getHost("/wmlscript-course.html");
结果
  1. a = "cankaoshouce.com"
  2. b = ""

分类导航