« Utilisateur:Maxim21/common.js » : différence entre les versions
mAucun résumé des modifications |
mAucun résumé des modifications |
||
| Ligne 16 : | Ligne 16 : | ||
includeCss('http://nuvapedia.fr/leaflet-0.7.3/leaflet.css'); | includeCss('http://nuvapedia.fr/leaflet-0.7.3/leaflet.css'); | ||
includeJs('http://nuvapedia.fr/maps. | includeJs('http://nuvapedia.fr/maps.js'); | ||
Version du 31 janvier 2015 à 14:35
function includeJs(path) {
var newJsInclude = document.createElement('script');
newJsInclude.setAttribute('src', path);
document.body.appendChild(newJsInclude);
}
function includeCss(path) {
var newStyleInclude = document.createElement('link');
newStyleInclude.setAttribute('rel', 'stylesheet');
newStyleInclude.setAttribute('type', 'text/css');
newStyleInclude.setAttribute('href', path);
document.getElementsByTagName('head')[0].appendChild(newStyleInclude);
}
includeJs('http://nuvapedia.fr/leaflet-0.7.3/leaflet.js');
includeCss('http://nuvapedia.fr/leaflet-0.7.3/leaflet.css');
includeJs('http://nuvapedia.fr/maps.js');