Sometimes, we often need to publish customer information and other information online for contact. However, with more and more customer information, do you feel that your online updates are becoming more and more inadequate? What to do? In fact, in addition to using back-end languages such as asp and php to achieve quick updates, Dreamweaver itself provides methods for data import and sorting, which is definitely a great boon to friends who do not understand the back-end. dw has also retained this function from version 3 to the latest mx, which shows its practicality. Let’s take a look at its effectiveness below.
Note: This article uses dreameaver MX as an example
. 1. For example, we now have a kehu.txt file on hand, which contains the customer contact form of ** company. The detailed information is as follows:
name, gender, position, phone number
Li Ming, male, Company A Technical staff, 87185900
Li Yan, male, manager of Company B, 80226888
Wang Qiang, male, chief engineer of Company C, 83546790
Su Lin, female, marketing staff of Company D, 87556341
Chen Dongdong, male, project director of Company E, 87436588
You can see that this Each item is separated by commas.
2. (1) Open DW MX, create a new html page, and select insert/table objects/import tabular data in the menu bar.
Figure 1
(2) The import tabular data window appears, click the "Browse..." button, and select the text file to store the data. The Delimiter item must correspond to the delimiter in the text file, because the kehu.txt file uses commas. , so I chose Comma, and other items can be selected and modified according to your needs.
Figure 2
(3) Finally click "OK", and a table containing text file data will be presented in front of you.
Figure 3
3. (1) Although the table has been made, sometimes we need to sort the data in the table. Of course, DW also thought of this. First select the table, and then select the commands/sort table item in the menu bar.
Figure 4
(2) The sort table window appears. Select column 1 for the sort by item. Alphabetically and ascending order Ascending for the order item. For other items, you can refer to Figure 5 to make selections as needed.
Figure 5
(3) Click "OK" to complete the sorting of column 1 in the table. The names in column 1 are arranged in ascending order by pinyin letter size.
Figure 6
4. (1) Now that we have the effects and sorting, the last thing to do is to beautify the table. Everyone loves beauty, and tables are no exception. In addition to manual beautification, DW also provides There are seventeen styles for you to choose from. Similar to sort table, select the table first and then select the commands/format table item.
Figure 7
(2) The format table window appears. There are various styles in the upper left corner. You can choose according to your preferences. Because the rest of the items are fool-like operations, I will not introduce them one by one here. I just emphasize the last item. This item asks you whether to add each style code to the TD tag instead of adding it to the TR tag by default. The author here recommends that you do not check it, otherwise it will generate much more code than the default setting.
Figure 8
(3) Click "OK" and you're done. The final rendering is as follows. How about it? This can be done in a few simple steps. Functions that originally required background programming can be easily accomplished with DW. This is where its power lies.