MediaWiki:Common.js: Razlika med redakcijama
(Nova stran z vsebino: →Any JavaScript here will be loaded for all users on every page load.: function fun() { var data="hello"; $.get("http://mars.feri.um.si:8080", function(response)...) |
|||
Vrstica 10: | Vrstica 10: | ||
}); | }); | ||
console.log(data); | console.log(data); | ||
+ | var myElement = document.getElementById('test'); | ||
+ | myElement.innerHTML = 'any HTML'; | ||
return data; | return data; | ||
} | } |
Redakcija: 11:37, 25. oktober 2016
/* Any JavaScript here will be loaded for all users on every page load. */ function fun() { var data="hello"; $.get("http://mars.feri.um.si:8080", function(response) { data = response; }).error(function(){ alert("Sorry could not proceed"); }); console.log(data); var myElement = document.getElementById('test'); myElement.innerHTML = 'any HTML'; return data; }