简体   繁体   中英

How to get text out of a text file and let it be shown inside a <table>?

我想在<table>中显示我的txt文件的一些数字...从理论上讲,数字应该替换3个黑色的行...我几乎尝试了所有操作: <object> ,JavaScript,HTML等...

If you are providing your content with a server, you can use the Fetch API to fetch one of your files:

fetch('path/to/file.txt')

I would recommend storing data in a .json file rather than a .txt file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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