css - Is it possible to generate a file with javascript and send it to server? -
is possible generate file javascript , send server? have section in web page user can modify style of page, , want generate css file style configuration before send server. possible? thanks!
var blob = new blob(["css content"],{type:"text/css"}); var formdata = new formdata() formdata.append("file",blob,"filename"); var xhr = new xmlhttprequest(); xhr.open('post', '/server', true); xhr.onload = function(e) { /**get answer server*/}; xhr.send(formdata);
Comments
Post a Comment