попробуй так:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Сайт</title>
<style type="text/css">
</style>
</head>
<body>
<form name="mainform">
<div id="number">
<p>№ Трубы</p>
<input type="text" id="folk">
<input type="button" name="button" value="Добавить данные" onClick="inner()">
</div>
<div id="tab_find"></div>
<script type="text/javascript">
function inner() {
var FSO = new ActiveXObject("Scripting.FileSystemObject");
var file = FSO.OpenTextFile("c:\\filesave.txt", 1, true);
var poisk = document.getElementById("folk");
var spisok = document.getElementById("tab_find");
var reg = new RegExp(poisk.value,'gi');
spisok.innerHTML += "<table>";
while (!file.AtEndOfStream) {
var a = file.ReadLine();
if(reg.test(a)) spisok.innerHTML += "<tr><td>" + myArray[i] + "<\/td><\/tr>";
}
spisok.innerHTML += "<\/table>";
}
</script>
</form>
</body>
</html>