MediaWiki:Common.js: Razlika med redakcijama
Vrstica 1: | Vrstica 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
+ | |||
+ | (function () { | ||
+ | |||
+ | var myElement = document.getElementById('test'); | ||
+ | myElement.innerHTML = 'any HTML'; | ||
+ | |||
+ | }()); | ||
$("#test").html("any HTML"); | $("#test").html("any HTML"); |
Redakcija: 13:02, 25. oktober 2016
/* Any JavaScript here will be loaded for all users on every page load. */ (function () { var myElement = document.getElementById('test'); myElement.innerHTML = 'any HTML'; }()); $("#test").html("any HTML"); /*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; }*/