Copier le code du code comme suit:
<cript>
fonction getrootpath () {
var strulllpath = window.Document.location.href;
var strpath = window.Document.Location.PathName;
var pos = strullpath.indexof (strpath);
var prepath = strullpath.substring (0, pos);
var postpath = strpath.substring (0, strpath.substr (1) .Indexof ('/') + 1);
Return (prepath + post-path);
}
var webPath = getrootpath ();
</cript>