Answer the question
In order to leave comments, you need to log in
How to convert comma delimited html data to array?
There is this line in HTML:
<div id="content">текст,65665,текст,текст,65665,56854</div>
var array = [текст,65665,текст,текст,65665,56854];
Answer the question
In order to leave comments, you need to log in
const el = document.querySelector('#content')
var array = el.textContent.split(',')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question