简体   繁体   English

如何使用javascript在HTML网站中显示CSV Excel列表?

[英]How to show CSV Excel list in an HTML website using javascript?

I'm new to computer science, and I am tinkering with CSV files for the first time. 我是计算机科学的新手,并且是第一次修整CSV文件。 I have a CSV file I created in Excel that looks like this: 我有一个在Excel中创建的CSV文件,如下所示:

[Name]   [Country]   [Bio]

[Amelia]   [America]   [etc. etc.]
[John]     [Germany]   [etc. etc.]

I want the lists to appear in my website per designated list, so it would look like: 我希望这些列表按照指定的列表显示在我的网站中,因此它看起来像:

 Name: Amelia
 Country: America
 Bio: Etc. etc.

 Name: John
 Country: Germany
 Bio: Etc. etc.

The formatting I can do with css, but how would I print my csv file into my website? 我可以使用CSS进行格式化,但是如何将CSV文件打印到我的网站中?

I also want to be able to add to my csv file from the website, though I have no idea where to start since my knowledge of javascript is very limited, but I want to create something like this: 我也希望能够从网站添加到我的csv文件中,尽管由于我对javascript的了解非常有限,所以我不知道从哪里开始,但是我想创建如下内容:

Enter a name: (input)
Enter their country: (input)
Enter their Bio: (input)

And have it add to the list under its corresponding name. 并将其添加到其对应名称下的列表中。

The main problem is that I have no idea how to connect my website to my HTML file. 主要问题是我不知道如何将网站连接到HTML文件。 Any help or advice would be greatly appreciated! 任何帮助或建议,将不胜感激!

Jquery has some tools for this. jQuery为此提供了一些工具。 Import jquery dependency in your home html. 在您的首页html中导入jquery依赖项。 This link may help you. 链接可能会对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM