Archive For The “Scripting – Javascript” Tutte le categorie:

QUERYSTRING

function querySt(ji) { hu = window.location.search.substring(1); gy = hu.split(“&”); for (i=0;i<gy.length;i++) { ft = gy[i].split(“=”); if (ft[0] == ji) {return ft[1];} } }

PAGE LOAD TIME

var date =3D new Date(); //oggetto data generico var start =3D date.getTime(); //timestamp attuale $(function () { var date1 =3D new Date(); date1secs =3D date1.getTime(); $(“#domready”).text(date1secs – start); //millisecondi per caricare il DOM }); window.onload =3D function () { var date2 =3D new Date(); date2secs =3D date2.getTime(); $(“#windowLoad”).text(date2secs – start); // millisecondi per caricare la…

PROTOTYPE in javascript

Date.prototype.MyFunction = function () { alert(‘prova’); } var s = new Date(); s.MyFunction();

Go Top