"save as" html on server side

First of all this is not a question about how can I use http client on server, it's more about JS. I have a protected area on site (let say /myprotected/ ), all css and images are on it. I want to html post it all (let say /htmlconverter) . And on server side finally convert it to looks like offline page. Something like "save as" in browser. Here is the code for html text only function submitForm(){ var htmlelement = document.getElementById("html"); htmlelement.value = document.getElementById("source").innerHTML; document.forms["innerForm"].submit(); }.....
Is there a way to send all resources including img and css to server? Added: I find this topic on serializing images [https://stackoverflow.com/questions/934012/get-image-data-in-javascript][1] For css I will try to AJAX call the css source and add response as a text to a new post. [1]: https://stackoverflow.com/questions/934012/get-image-data-in-javascript
So let me see if I understand, you want to save your own site? This is to distribute to users?

以上就是"save as" html on server side的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏