<請益>如何將以下語法改成JS或html? 不知有沒有人會呢?謝謝

<請益>如何將以下語法改成JS或html?
不知有沒有人會呢?謝謝

img


window.onload=function(){
      var counterobject = document.querySelector('#counter ul li:first-child span')
      var counterobject2 = document.querySelector('#counter ul li:last-child span')
      var counteramount = counterobject.innerText
      var counteramount2 = counterobject2.innerText

      counteramount = parseInt(counteramount)
      counteramount = (counteramount+999)*999
      counterobject.innerText=counteramount
      counterobject.style.display = 'inline'

      counteramount2 = parseInt(counteramount2)
      counteramount2 = (counteramount2+999)*999
      counterobject2.innerText=counteramount2
      counterobject2.style.display = 'inline'
    }

jq语法有隐式迭代,会自动遍历所有dom对象,所以效果并不能完全一一样