by Guest » 09 Feb 2025, 12:40
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
Hallo, ich habe die URL-API ausprobiert und es gab mir folgende Ergebnisse: < /p>
[code]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? /[/code]?
[/list]
Vielen Dank im Voraus und einen guten Tag