将行转换为列 [英] convert row to column

查看:97
本文介绍了将行转换为列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有两个文件。第一个文件有内容(即整个数据是以空格分隔的单行)

例如:

Hi,

i have two files. First file has contents (ie. entire data is in single row separated by space)
Eg:

Test1 Test2 Test3





在第二个文件中,我写了下面的代码来从第一个文件中获取数据。



In 2nd file, i have written below code to get data from first file.

<div id="Page1"><iframe src="../awards/Page1.html"></iframe></div>



这显示第一个文件中的数据。



现在我想以表格格式显示数据,每个值都应该在新行中。应该只有一列。

ie。输出应该是


this shows the data as in first file.

now i want to display the data in table format and each value should come in new row. There should be only one column.
ie. output should be

Test1
Test2
Test3





我如何应用javascript for循环来实现这个目标?



问候,



how do i apply javascript for loop to achieve this?

Regards,

推荐答案

Refer - 使用HTML5 FileReader API读取文件 [ ^ ]。
Refer - Reading Files Using The HTML5 FileReader API[^].


这篇关于将行转换为列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆