Create HTML file with JavaScript

后端 未结 3 949
被撕碎了的回忆
被撕碎了的回忆 2021-01-18 08:44

I\'m looking for a way to use a JavaScript function to create a new HTML file in the local directory. Is this possible?

Thanks

3条回答
  •  悲哀的现实
    2021-01-18 08:59

    Using javascript to create html is generally a bad idea because that's not what javascript was designed for, and there is nothing about javascript that makes it well-suited for that task. You're much better off generating html with a server-side language like php, which is commonly used to create html.

提交回复
热议问题