另外,ACE-encoded是什么编码呢?
(另加分:-))

解决方案 »

  1.   

    match不是href的方法 是正则表达式的内容 楼主具体可自己百度去了解下正则match地用法
    ACE-encoded编码?没见过
      

  2.   

    document.location.href.match(/^keyword:(.+)$/i) //地址栏中的地址是否 存在这样开头的字符串keyword:以任意字符结束的字符串。
    ACE-encoded:
    ACE.ACE is a fromcode or tocode name that can be used in iconv code conversions to refer to the ASCII Compatible Encoding defined in RFC 3490. This conversion uses STD3 ASCII rules. Unassigned characters are not allowed. ACE is typically used for storing or giving host or domain names to machines比如:我们申请的中文域名,目前访问的时候,最终都转化为 Ace编码访问的。
      

  3.   

    document.location.href表示本页面的url地址,是字符串类型
    所以可以使用match来进行正则匹配等