Hidden Tag
Örnek
<!DOCTYPE html>
<html>
<body>
<h1>Gizli Alan</h1>
<form action="/action_page.php">
<label for="fname">Adınız</label>
<input type="text" id="fname" name="fname"><br><br>
<input type="hidden" id="GecenSaniye" name="gecen_sn" value="">
<input type="submit" value="Gönder">
</form>
<script>
const start = Date.now();
setInterval(() => {
const seconds = ((Date.now() - start) / 1000).toFixed(1);
//console.log(seconds + " sn geçti");
document.querySelector("#GecenSaniye").value=seconds;
}, 1000);
</script>
</body>
</html>
<html>
<body>
<h1>Gizli Alan</h1>
<form action="/action_page.php">
<label for="fname">Adınız</label>
<input type="text" id="fname" name="fname"><br><br>
<input type="hidden" id="GecenSaniye" name="gecen_sn" value="">
<input type="submit" value="Gönder">
</form>
<script>
const start = Date.now();
setInterval(() => {
const seconds = ((Date.now() - start) / 1000).toFixed(1);
//console.log(seconds + " sn geçti");
document.querySelector("#GecenSaniye").value=seconds;
}, 1000);
</script>
</body>
</html>