Tabular Data Control (TDC): This is a simple DSO that provides access to formatted text files. That is, the data source provided by TDC is a text file that is formatted with a specified separator. It can be applied to all browsers above IE4.0, and he also created a simple database (such as PHP MySQL) that does not require server-side scripting, just simple application client scripts can be operated as JavaScript TDC. But if your browser is NS, then you have to install a plugin has got the same effect.
TDC application template:
Like Applet, any Object must have parameters, TDC has approximately eight parameters, here I don't want to introduce one, I only introduce 5 important parameters:
1, DataURL: You want to read the path of the text, for example: c: /data.txt
2, Useheader: Get the column name of the data to output in the first line of the file
3, TextQualifier: Determine a specific symbol surrounded by your data, for example ~ zhaoweiwei ~, here is "~" as this symbol
4, FieldDelim: Symbols for dividing two adjacent data in a row
5, Rowdelim: Determine a symbol already indicates the end of a line, the default value is: Retail
For example, as follows:
YourDataFile.txt content
Name | AGE ~ premshree pillai ~ | ~ 19 ~
Let's introduce the actual application and its advantages:
If I want to display a form in a web page to store my contact, but I don't want every time I increase the new content or modify the previous content, I will modify my web page, and this less content is also There is no need to use the database like the database, so the TDC method has become my own choice.
Remember to put your * .txt file and your web page (* .htm) file in the same directory, first build a txl.txt file (in accordance with the format above), as follows:
Name | AGE | Phone | QQ | Mail
~ Zhao Guan Nan ~| ~ 22~| ~ 1381303698~|~231312~| @ 2a@sina.com
~ Yang Xu ~|~22~|~1393023698 ~| ~ 122256312 ~| Yangx@sina.com
~ Han Hongli ~| ~ 23 ~| ~ 138136556~| ~8297312 ~|Hanghl@sina.com
Here I only record a few information, and I will not write more for the insight.
Then start building our web page (TDC_EX.HTM) as follows:
Object>