当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP Column 属性
The Column property returns the column number of the current character position in an input stream.
ASP Column属性返回的是当前的字符处于整条文本中的第几个,即:返回当前字符所处的列数。
Note: This property is 1 after a new line character is written (even before any other character is written).
注意:这个属性只是针对同一行文本而言的,如果新的一行文本开始,那么它将又从数字1开始重新计数,而不是接续前面的文本计数。
TextStreamObject.Column |
<% dim fs,f,t,x,y set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.CreateTextFile("c:test.txt") f.write("Hello World!") f.close set t=fs.OpenTextFile("c:test.txt",1,false) do while t.AtEndOfStream<>true x=t.Read(1) y=t.Column-1 loop t.close Response.Write("The last character in the text file is: " & x) Response.Write("<br /> at character position: " & y) %> Output: The last character in the text file is: ! |