<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
统计访问页面的人数 function total(path){ var fso, tf, count; fso = new ActiveXObject("Scripting.FileSystemObject"); if(!fso.FileExists(path)){ tf = fso.CreateTextFile(path, true); tf.write("1"); tf.Close(); } f = fso.OpenTextFile(path,1); count = Number(f.ReadLine()); //alert(count); f = fso.OpenTextFile(path,2); f.Write(count+1); document.getElementById("num").innerHTML = count; f.Close(); }
页面来访人数为: