نسخ رمز رمز على النحو التالي:
<script>
وظيفة getRootPath () {
var strfulllpath = window.document.location.href ؛
var strprath = window.document.location.pathName ؛
var pos = strfullpath.indexof (strPrath) ؛
var prepath = strfullPath.SubString (0 ، pos) ؛
var postpath = strath.substring (0 ، strPrath.substr (1) .indexof ('/')+1) ؛
العودة (prepath+postpath) ؛
}
var webpath = getRootpath () ؛
</script>