how to set a var in js to be a download
var textToSave = 'this is a test';
var hiddenElement = document.createElement('a');
hiddenElement.href = 'data:attachment/text,' + encodeURI(textToSave);
hiddenElement.target = '_blank';
hiddenElement.download = 'myFile.txt';
hiddenElement.click();
Also in HTML:
- selenium python get innerhtml
- vmware 12 linux
- prefill input field html
- execute js with innerhtml
- js create html element
- how to link javascript to html
- html timer
- how to use jquery
- jquery replace innerhtml
- game engine
- ionic badge
- move cursor to end of line javascript
- post request html android
- what does htmlentities do in php
- html
- how to create a search box with html
- html inline javascript
- html email template
- a href
- html table filter by all columns
- making a website loader js
- relier js a html
- html video preload
- html input readonly