EUNO.NEWS EUNO.NEWS
  • All (20543) +144
  • AI (3117) +9
  • DevOps (914) +5
  • Software (10652) +105
  • IT (5812) +25
  • Education (48)
  • Notice
  • All (20543) +144
    • AI (3117) +9
    • DevOps (914) +5
    • Software (10652) +105
    • IT (5812) +25
    • Education (48)
  • Notice
  • All (20543) +144
  • AI (3117) +9
  • DevOps (914) +5
  • Software (10652) +105
  • IT (5812) +25
  • Education (48)
  • Notice
Sources Tags Search
한국어 English 中文
  • 3周前 · software

    URL 模式 API

    URL Pattern API 允许使用模式匹配和构建 URL。它提供 `URLPattern` 构造函数,可接受模式对象或字符串,支持协议、主机名、端口、路径名、查询和哈希等组件。实例方法 `test`、`exec`、`testAll`、`execAll` 用于匹配 URL,返回布尔值或匹配结果对象。模式中的占位符以 `:name` 表示,可在匹配后通过 `groups` 访问。该 API 在浏览器和服务端(Node.js)中均可使用,适用于路由、重写和安全检查等场景。

    #url-pattern #web-api #javascript #mdn #web-development #browser-api
EUNO.NEWS
RSS GitHub © 2026