“So erstellen Sie einen Blob JavaScript” Code-Antworten

So erstellen Sie einen Blob JavaScript

new Blob([`${/*this part declares the value*/'<h1>Hello</h1><style>h1:after{content:"world!"}</style>'}`], {
    type: 'text/html'
})
Mais Inc

Neuer Blob JavaScript

//The Blob() constructor returns a new Blob object. The content of the blob
//consists of the concatenation of the values given in the parameter array.

const obj = {hello: 'world'};
const blob = new Blob([JSON.stringify(obj, null, 2)], {type : 'application/json'});
Undefined

Ähnliche Antworten wie “So erstellen Sie einen Blob JavaScript”

Fragen ähnlich wie “So erstellen Sie einen Blob JavaScript”

Weitere verwandte Antworten zu “So erstellen Sie einen Blob JavaScript” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen