KK 7








const form = document.querySelector('form'); form.addEventListener('submit', function(event) { event.preventDefault(); const entryPrice = parseFloat(document.getElementById('entry-price').value); const stopLossPrice = parseFloat(document.getElementById('stop-loss-price').value); const takeProfitPrice = parseFloat(document.getElementById('take-profit-price').value); const stopLoss = entryPrice - stopLossPrice; const takeProfit = takeProfitPrice - entryPrice; alert(`Stop Loss: ${stopLoss}\nTake Profit: ${takeProfit}`); });

Tidak ada komentar:

Posting Komentar