Page 1 of 1

Neue URL (URL) .PathName löscht Verwandte in JavaScript [geschlossen]

Posted: 09 Feb 2025, 12:40
by Guest
Hallo, ich habe die URL-API ausprobiert und es gab mir folgende Ergebnisse: < /p>

Code: Select all

let a = new URL('http://localhost:8081/../../')
console.log(a.pathname)
// output: "/"
< /code>
let a = new URL('http://localhost:8081/././/.\.\.//hhah')
console.log(a.pathname)
// output: "//...//hhah"
< /code>
[list]
[*] Kann mir bitte jemand dieses Verhalten erklären? /
?
[/list]
Vielen Dank im Voraus und einen guten Tag