2021-10-01 18:26:40 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>Editor</title>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
|
|
<style>
|
|
|
|
ul {
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
ul li:before {
|
|
|
|
content: '- \0000a0';
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
|
|
|
var inputs = []
|
|
|
|
|
|
|
|
function changed() {
|
|
|
|
var lastNum = document.getElementById("lastNum")
|
|
|
|
if (lastNum.value) {
|
|
|
|
inputs.push(lastNum)
|
|
|
|
lastNum.name = "song[]"
|
|
|
|
lastNum.removeAttribute("onchange")
|
|
|
|
lastNum.removeAttribute("onkeyup")
|
|
|
|
lastNum.removeAttribute("id")
|
|
|
|
|
|
|
|
var newNum = document.createElement("INPUT")
|
|
|
|
newNum.type = "number"
|
|
|
|
newNum.id = "lastNum"
|
|
|
|
newNum.max = 500
|
|
|
|
newNum.min = 1
|
|
|
|
newNum.onchange = newNum.onkeyup = () => changed()
|
|
|
|
var li = document.createElement("LI")
|
|
|
|
li.appendChild(newNum)
|
|
|
|
document.getElementById("list").appendChild(li)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
|
|
<h1>Editor</h1>
|
|
|
|
</header>
|
|
|
|
<main>
|
2021-10-01 21:50:08 +02:00
|
|
|
<h2>Números de las canciones</h2>
|
2021-10-01 18:26:40 +02:00
|
|
|
<form action="generar.php" method="post">
|
|
|
|
<ul id="list">
|
|
|
|
<li><input id="lastNum" type="number" max="500" min="1" onkeyup="changed()" onchange="changed()"></li>
|
|
|
|
</ul>
|
|
|
|
<button type="submit">Enviar</button>
|
|
|
|
</form>
|
2021-10-01 21:50:08 +02:00
|
|
|
<h2>Índice</h2>
|
|
|
|
<iframe src="/" height="400px" width="100%"></iframe>
|
2021-10-01 18:26:40 +02:00
|
|
|
</main>
|
|
|
|
</body>
|
2021-10-01 21:50:08 +02:00
|
|
|
</html>
|