Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

32.设计一个方案,在浏览器中点击一个button,然后能在你的前端项目源码文件中增加一个index.js文件,如何实现?提供思路 #34

Open
airuikun opened this issue Aug 4, 2019 · 5 comments

Comments

@airuikun
Copy link
Owner

airuikun commented Aug 4, 2019

第 2 题:设计一个方案,在浏览器中点击一个button,然后能在你的前端项目源码文件中增加一个index.js文件,如何实现?提供思路

@bowencool
Copy link

在文档头部?document.createElement('script')

@Evanna51
Copy link

require

@IrvingZhao
Copy link

源码文件是不是要求有点高
如果是git的话,理论上可以模拟git - commit数据的请求

@youzizi1
Copy link

纯前端应该做不到吧,我能想到的是起一个node服务,让node去创建index.js文件到目标路径

@lively-krishnan
Copy link

首先node 起一个服务,接着写一个创建文件的命令,拿到事件后 执行这个命令

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants