<html>
<head>
<title>new page</title>
<script>
function GetHeader(src) {
//权限只读(只读=1,只写=2 ,追加=8 等权限)
var ForReading=1;
var fso=new ActiveXObject("Scripting.FileSystemObject");
var f=fso.OpenTextFile(src,1,true);
return(f.ReadAll());
}
var arr=GetHeader("d:\\test.txt").split("\r\n");
for(var i=0;i<arr.length;i++){
//alert("第"+(i+1)+"行数据为:"+arr[i]);
var date=arr[i].split(",");
for(var j=0;j<date[j].length;j++)
{ if(date[j]=='1211')
alert(date[j]+"正确");
}
}
</script>
</head>
<body>
</body>
</html>