I would need the function below in .asp, I have no idea of the language, can anyone help?
I did this in javascript, below:
function limparClasse(classe) {
var elementos = document.querySelectorAll('.' + classe);
for (var i = 0; i < elementos.length; i++)
elementos[i].innerHTML = elementos[i].innerHTML.replace(/,.*%/, "%");
}
window.onload="limparClasse('vtex-cpShow')"
<span class="desconto-de vtex-cpSave vtex-cpShow ">30.0 % OFF /* ESTE VALOR É GERADO PELO SISTEMA */</span>
An example in JsFiddle link