Oh, where to begin....1) In the tags, everything after an equals sign should either be a number or in quotes. It may also be a number in quotes.
2) Input tags should appear only inside of <FORM></FORM> tags
3) Your Script tags should be inside the Head tags.
4) There are easier ways to do go about your task than using Copy/Paste 25 times.
5) You probably couldn't find what you were looking for because your functionality is so ambiguous, and the first step of a programmer or scripter is to remove all ambiguity.
With that out of the way, I rewrote your app. It doesn't look pretty, and it doesn't do what you want. That's partly because of the fore mentioned ambiguity, and partly because I couldn't be bothered to take a whole five minutes on your problem.
<html>
<head>
<HTA:APPLICATION
APPLICATIONNAME="PortCheckboxes"
SCROLL="no" SINGLEINSTANCE="yes"><script language="VBScript">
Sub BuildPorts
Dim b, f, i
Set f = Document.Forms("ports")
For i = 0 To 25
f.innerHTML = f.innerHTML _
& "<input type=""checkbox"" name=""chkBx"">" & (i + 1) & "<br>"
Next
Set b = Document.createElement("input")
With b
.type = "button"
.value = "Preform Action"
.id = "runbutton"
.name = "runButton"
.attachEvent "onclick", GetRef("OutputPorts")
End With
f.AppendChild b
End Sub
Sub OutputPorts
Dim c, sLine
For Each c In Document.GetElementsByName("chkBx")
sLine = sLine & CStr(Int(c.checked) And 1) & ","
c.checked = False
Next
With CreateObject("Scripting.FileSystemObject")
With .CreateTextFile("a.hta.txt")
.WriteLine Left(sLine, Len(sLine) - 1)
.Close
End With
End With
End Sub
</script>
</head>
<body onload="BuildPorts">
<form id="ports">
</form>
</body>
</html>