E
E
Ensiouel2017-08-12 16:29:39
JavaScript
Ensiouel, 2017-08-12 16:29:39

Is it possible to create tags using JS?

There was a need to create, but I can not find how to do it

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
Johny, 2019-04-02
@AleksandrB

Can it be like this

new Date('2019-03-11 15:48:37').toLocaleDateString('ru-RU', {
        month: 'short',
        day: '2-digit',
        hour: '2-digit',
        minute: '2-digit'
    });

Not compatible with all browsers

A
Alexander Pushkarev, 2017-08-12
@AXP-dev

What exactly are the tags? The DOM is fully workable

// $('ТЕГ', {ОБЪЕКТ С ПАРАМЕТРАМИ});
var img = $('<img>', {src: 'img.jpg'});

F
Funt01, 2017-08-12
@Funt01

https://learn.javascript.ru/modifying-document
This looks like what you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question