How to teach reading values from the block id?

Have minimal knowledge of JS, trying to write a auto-withdrawal, in the presence of ODA. balance on the website.
Unit with balance looks like this:
<li class="balanceli"><span id="balance">0.00525239</span> BTC</li>

Ie if the balance is greater than or equal to the specified value, the action occurs. But nothing works :(
if (AUTO_WITHDRAW == "ON") //Auto-withdrawals
{
 if (!window.content.document.getElementById("balance"))
{
 log('Output bitcoin...');
 limDisplay("Derive a bitcoin...")

 iret = limPlay("CODE:"+"SET !ERRORIGNORE YES"+n+"SET !TIMEOUT_PAGE 60"+n+"SET !TIMEOUT_STEP 10"+n+"TAB CLOSEALLOTHERS"+n+"TAB T=1"+n+"URL GOTO=https://freebitco.in"+n+"WAIT SECONDS=10"+n)

 var accountBTC = Number(window.content.document.getElementById("balance")[0].innerHTML.replace(',',"));
 if (accountBTC < 0.00002)
{
 //NO OPERATION
}
 else if ((accountBTC >= 0.00002))
{
 iret = limPlay("CODE:"+"SET !ERRORIGNORE YES"+n+"SET !TIMEOUT_STEP 10"+n+"TAG POS=1 TYPE=BUTTON ATTR=TXT:WITHDRAW+n+WAIT SECONDS=3"+n+"TAG POS=2"+n); 
}
}
 }
June 7th 19 at 15:03
3 answers
June 7th 19 at 15:05
Solution
For mathematical operations on currencies are used, or special libraries or integers, not floating-point numbers.
> 31.01+1
< 32.010000000000005
> 31.02+1
< 32.019999999999996
> 9007199254740993
< 9007199254740992

When adding in JavaScript, there are many decimal places?
How to store and work with money in a code and the database?
It was in a comma, superfluous code) Thanks - nikita.Stracke commented on June 7th 19 at 15:08
June 7th 19 at 15:07
Oh, Oh, Oh. It's not the front supposed to do, buck. Otherwise unable to XSS.
And about the correctness - check what does Your limPlay and run via the console.log what You have there in variables.
limPlay doing everything right, ie when the right balance is clicking "WITHDRAW", but the action is not happening, I don't know why. On the violas, everything works fine. - nikita.Stracke commented on June 7th 19 at 15:10
that tells trace in the console.log? In each variable the correct data? - nikita.Stracke commented on June 7th 19 at 15:13
may all the trite and simple in Your case
R=TXT:WITHDRAW+n+WAIT SECO

+n+ - probably outside the quotation marks should be? - Gonzalo.Hane39 commented on June 7th 19 at 15:16
June 7th 19 at 15:09
window.content.document.getElementById("balance")what is it?

Find more questions by tags JavaScript