-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
<title>Game Top-up Shop</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background: #f5f5f5;
}
header {
background: #1e293b;
color: white;
padding: 1rem;
text-align: center;
}
.container {
max-width: 900px;
margin: 2rem auto;
padding: 1rem;
background: white;
border-radius: 12px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
h2 {
margin-top: 0;
}
.packages {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 1rem;
}
.card {
border: 1px solid #ddd;
border-radius: 10px;
padding: 1rem;
text-align: center;
cursor: pointer;
transition: 0.2s;
}
.card:hover {
border-color: #2563eb;
box-shadow: 0 4px 8px rgba(37,99,235,0.2);
}
.selected {
border-color: #2563eb;
background: #eff6ff;
}
form {
margin-top: 2rem;
}
input, select, button {
width: 100%;
padding: 0.7rem;
margin: 0.5rem 0;
border-radius: 8px;
border: 1px solid #ccc;
font-size: 1rem;
}
button {
background: #2563eb;
color: white;
border: none;
cursor: pointer;
}
button:hover {
background: #1d4ed8;
}
</style>
<script>
const cards = document.querySelectorAll('.card');
const packageName = document.getElementById('packageName');
const packagePrice = document.getElementById('packagePrice');
const form = document.getElementById('orderForm');
Game Top-up Shop
Buy MLBB Diamonds & PUBG UC Instantly
Choose Package
MLBB 100 Diamonds
$1.5
$1.5
MLBB 500 Diamonds
$7
$7
PUBG 60 UC
$1
$1
PUBG 325 UC
$5
$5
Fill in Details
Select Payment Method KBZPay WavePay PayPal Place Ordercards.forEach(card => {
card.addEventListener('click', () => {
cards.forEach(c => c.classList.remove('selected'));
card.classList.add('selected');
packageName.value = card.dataset.name;
packagePrice.value = card.dataset.price;
});
});
form.addEventListener('submit', (e) => {
e.preventDefault();
if(!packageName.value){
alert("Please select a package");
return;
}
const order = {
playerId: document.getElementById('playerId').value,
username: document.getElementById('username').value,
payment: document.getElementById('payment').value,
package: packageName.value,
price: packagePrice.value
};
alert(`✅ Order Placed!\nName: ${order.username}\nGame ID: ${order.playerId}\nPackage: ${order.package}\nPayment: ${order.payment}`);
});
</script>
bansalaokeneth14-cellbansalaokeneth14-cell
Metadata
Metadata
Assignees
Labels
No labels