Neue URL (URL) .PathName löscht Verwandte in JavaScript [geschlossen]
Posted: 09 Feb 2025, 12:40
Hallo, ich habe die URL-API ausprobiert und es gab mir folgende Ergebnisse: < /p>
?
[/list]
Vielen Dank im Voraus und einen guten Tag
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