다음과 같이 코드 코드를 복사하십시오.
<cript>
함수 getRootPath () {
var strfulllpath = window.document.location.href;
var strath = window.document.location.pathname;
var pos = strullpath.indexof (strath);
var prepath = strullpath.substring (0, pos);
var postpath = stratp.substring (0, stratp.substr (1) .indexof ( '/')+1);
반환 (Prepath+PostPath);
}
var webpath = getRootPath ();
</스크립트>