لم تعمل معي
/*global console, alert, prompt*/
var oldQuantity_input = document.getElementById("oldQuantity").value,
oldCost_input = document.getElementById("oldCost").value,
newQuantity_input = document.getElementById("newQuantity").value,
newCost_input = document.getElementById("newCost").value,
TotalQuantity_output = oldQuantity_input + newQuantity_input, // إجمالي الكمية
TotalCost_output = oldCost_input + newCost_input, // إجمالي التكلفة
newPrice_output = TotalCost_output / TotalQuantity_output, // السعر الجديد المعدل
textToNum = parseInt(oldQuantity_input, oldCost_input, newQuantity_input, newCost_input, TotalCost_output, TotalQuantity_output, newPrice_output);
function cacl() {
"use strict";
document.getElementById("Caclulate").innerHTML = newPrice_output;
}
أصبحت النتيجة undefined