5
해시가없는 자바 스크립트 창 위치 href?
나는 가지고있다: var uri = window.location.href; 제공합니다 http://example.com/something#hash #hash? 없이 전체 경로를 얻는 가장 쉽고 쉬운 방법은 무엇입니까? uri = http://example.com/something#hash nohash = http://example.com/something location.origin+location.pathname모든 브라우저에서 작동하지 않는 사용 을 시도했습니다 . 나는 location.protocol+'//'+location.host+location.pathname나에게 일종의 형편없는 해결책처럼 보이는 것을 사용해 보았습니다 . 그렇게하는 가장 좋고 쉬운 방법은 무엇입니까? 어쩌면 나는 …