<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>데몬스쿼드 쿠폰 사용 페이지</title>
<style>
*{
box-sizing: border-box;
}
h1{
text-align:center;
}
input{
font-size : 45px;
background-color: lightblue;
text-align: center;
}
.uid-form{
text-align: center;
}
.form-floating{
text-align: center;
}
.form-cup{
width: 50%;
text-align: center;
border: 2px solid gray;
border-radius: 5px;
}
</style>
</head>
<body>
<!-- partial:index.partial.html -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>
<script type="text/javascript">
function updateCup(){
const lcup= [
"앱스토어1위감사쿠폰",
"Cheering100",
"데몬스쿼드라운지",
"grandopen",
"demonsquad",
"thebestgame",
"라운지프로모션",
"PreEvent100",
"eoaggames",
"19450815",
"Lounge10000",
"Lounge5000",
"Lounge3000",
"Lounge1000",
];
let div = document.getElementById('cup');
let url = "https://eoaggames.com/Coupon/demon_coupon.php";
for( let i =0; i<lcup.length; i++){
const html = '<form action='+url+' method="post" target="param">'+
'<div class="form-floating">'+
'<input id="floatingInput" maxlength="30" placeholder="쿠폰명" name="coupon_name" type="text" value ='+
lcup[i]+ '>'+
'<input class="idfield" id="idfield" maxlength="10" name="user_index" type="hidden">'+
'<button type="submit">쿠폰 사용</button>'+
'</div>'+
'</form>';
div.innerHTML += html;
}
}
function updateUserId(){
updateCup();
let userid = document.getElementById('uid').value;
//const l = document.inputs['idfield'];
const l = document.querySelectorAll('.idfield');
for( let i = 0; i <l.length;i++){
l[i].value = userid;
}
}
</script>
<div class="bg">
</div>
<h1>데몬스쿼드 쿠폰 사용 페이지</h1>
<br>
<div class="uid-form">
<h2 for="fname">사용자ID:</h2>
<input type="text" id="uid" name="userid"><br>
<button type='button' onClick ="updateUserId();">클릭 해보세요</button>
<br>
<div class "form-cup" id = "cup">
</div>
</div>
<iframe class="if" name="param"></iframe>
<!-- partial -->
</body>
</html>
데몬 스쿼드 쿠폰 입력기! 코드
2023. 8. 21. 14:37
반응형