Display text file in JavaScript

后端 未结 2 646
耶瑟儿~
耶瑟儿~ 2020-12-31 15:12

What code should I use to display the contents of a plain-text .txt file in JavaScript? I want the text to scroll on screen in the active window.

Thanks in advance!<

2条回答
  •  执笔经年
    2020-12-31 16:01

    We can use below code for this purpose:

     
    

    Example

    Ref: Display text file in HTML

提交回复
热议问题