L

что бы такое можно написать чтобы он скачался в загрузки как бинарник?
Size: a a a
L
L
k
const link = document.createElement( 'a' );
link.style.display = 'none';
document.body.appendChild( link );
const blob = new Blob( [ yourArray ], { type: 'text/plain' } );
const objectURL = URL.createObjectURL( blob );
link.href = objectURL;
link.href = URL.createObjectURL( blob );
link.download = 'data.json';
link.click();
S
const link = document.createElement( 'a' );
link.style.display = 'none';
document.body.appendChild( link );
const blob = new Blob( [ yourArray ], { type: 'text/plain' } );
const objectURL = URL.createObjectURL( blob );
link.href = objectURL;
link.href = URL.createObjectURL( blob );
link.download = 'data.json';
link.click();
L
const link = document.createElement( 'a' );
link.style.display = 'none';
document.body.appendChild( link );
const blob = new Blob( [ yourArray ], { type: 'text/plain' } );
const objectURL = URL.createObjectURL( blob );
link.href = objectURL;
link.href = URL.createObjectURL( blob );
link.download = 'data.json';
link.click();
L
ab = new ArrayBuffer([1,2,3,4])
window.open( URL.createObjectURL(new Blob([ab], {type: "octet/stream"})) )
S
ab = new ArrayBuffer([1,2,3,4])
window.open( URL.createObjectURL(new Blob([ab], {type: "octet/stream"})) )
GT
new Date().toLocaleString()MDN пишет о полной поддержке метода replace в IE
.replace(/\,/g, '')
.replace(/\./g, '-')
.replace(/^(\d{2})-(\d{2})-(\d{4})\s?(.+)$/g, '$3-$2-$1 $4')
⠀
⠀
⠀
⠀
⠀
⠀
GT
GT
GT
V