Skip to content

Conversation

ghifarizoldick-maker
Copy link

<title>Top Up Game Online</title>

Top Up Game Online

Pilih Game Mobile Legends Free Fire PUBG Mobile
User ID
Nominal Top Up Rp5.000 Rp10.000 Rp20.000 Rp50.000 Rp100.000
Jumlah Pembelian
Metode Pembayaran Dana OVO Gopay Bank Transfer

Top Up Sekarang

Riwayat Transaksi

  • Belum ada transaksi.
<script> const form = document.getElementById('topupForm'); const historyList = document.getElementById('history');
form.addEventListener('submit', function (e) {
  e.preventDefault();

  const game = document.getElementById('game').value;
  const userId = document.getElementById('userId').value;
  const nominal = parseInt(document.getElementById('nominal').value);
  const jumlah = parseInt(document.getElementById('jumlah').value);
  const payment = document.getElementById('payment').value;
  const total = nominal * jumlah;

  const detail = `Top Up ${game} untuk ID ${userId}, jumlah ${jumlah}x Rp${nominal.toLocaleString()} via ${payment} = Total Rp${total.toLocaleString()}`;

  alert(`Pembayaran diproses melalui ${payment}.\n\n${detail}`);

  const li = document.createElement('li');
  li.textContent = detail;

  if (historyList.children[0].textContent === "Belum ada transaksi.") {
    historyList.innerHTML = "";
  }

  historyList.prepend(li);
});

</script>

Copy link

netlify bot commented Aug 2, 2025

👷 Deploy request for another-astro-starter pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 72b229d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant