I have attached the HTML on Photo
Question – how to get all data of price, qty from HTML in js and multiple it accordingly and add it into HTML in Django. anyone help me.
const x = document.getElementById("qty").innerHTML;
const y = document.getElementById("price").innerHTML;
const z = document.getElementById("total");
function calculator(qty, price) {
let lowercase = price.toLowerCase();
const remove_price_string = lowercase.replace("only", "");
console.log(remove_price_string);
let total = remove_price_string * qty;
console.log(total);
}
calculator(x, y);