Answer the question
In order to leave comments, you need to log in
How to display the value of a variable from the site to the console?
<h6 class="card-sub-title">
myname;) </h6>
<span style=" color: #fff;font-weight: 500;font-size: 1.6em;line-height: 1;letter-spacing: -0.02em;" mybalance="52.58" class="odometer" id="userBalance">
52.58</span>
</div>
Answer the question
In order to leave comments, you need to log in
You need to do not mybalance but data-mybalance
Then you need to get the element that has the attribute you need, and then find it by name and output it to the console. https://developer.mozilla.org/ru/docs/Web/Guide/HT... https://developer.mozilla.org/ru/docs/Web/API/Elem...
console.log(el.getAttribute('data-mybalance'))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question