Начало
Калькуляторы
Мировое Население
Текущее мировое население, основанное на примерно данных о переписи и мировом темпе роста. Для точности измените сами количество населения России
(Refresh the page to see an updated world population amount.)
JavaScript Calculators: мировое население
<!-- ONE STEP TO INSTALL WORLD POPULATION: 1. Copy the coding into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the BODY of your HTML document --> <BODY> <SCRIPT LANGUAGE="JavaScript"> <! > <! > <!-- Begin var worldpop = 6080141683; // US Census estimate on 7/1/00 m = 7 d = 1 yr = 2000 var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); var today=new Date(); var todayy=today.getYear(); // Y2K Fix by Isaac Powell // http://onyx.idbsu.edu/~ipowell if ((navigator.appName == "Microsoft Internet Explorer") && (todayy < 2000)) todayy="19" + todayy; if (navigator.appName == "Netscape") todayy = 1900 + todayy; function outputComma(number) { // (c) irt.org number = '' + number; if (number.length > 3) { var mod = number.length%3; var output = (mod > 0 ? (number.substring(0,mod)) : ''); for (i=0 ; i < Math.floor(number.length/3) ; i++) { if ((mod ==0) && (i ==0)) output += number.substring(mod+3*i,mod+3*i+3); else output += ',' + number.substring(mod+3*i,mod+3*i+3); } return (output); } else return number; } var todaym = today.getMonth(); var todayd = today.getDate(); var todaystring = new Date(); var paststring = montharray[m-1]+" "+d+", "+yr; growth = Math.floor(2.6*(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(1000))*1)); document.write("World Population is estimated to be: <b>" + outputComma(worldpop+growth) + "</b>"); // End --> </script> <!-- Script Size: 1.71 KB -->