function nextJump1(x) {
if (x.value.length == 1) {
x.value = "";
do {
x = x.nextSibling;
}
while (x && !(/text/.test(x.type)));
if (x && /text/.test(x.type)) {
$(x).select();
}
}
}
<div class="pass" style=" display: inline-block; line-height: 2">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; height: 25px; text-align: center; display: inline; border-radius: 0px;" maxlength="1" placeholder="1">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; background: #b7ebf1; border: 1px solid #b7ebf1; height: 25px; text-align: center; display: inline; border-radius: 0px;" disabled="" placeholder="2">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; background: #b7ebf1; border: 1px solid #b7ebf1; height: 25px; text-align: center; display: inline; border-radius: 0px;" disabled="" placeholder="3">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; background: #b7ebf1; border: 1px solid #b7ebf1; height: 25px; text-align: center; display: inline; border-radius: 0px;" disabled="" placeholder="4">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; height: 25px; text-align: center; display: inline; border-radius: 0px;" maxlength="1" placeholder="5">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; height: 25px; text-align: center; display: inline; border-radius: 0px;" maxlength="1" placeholder="6">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; background: #b7ebf1; border: 1px solid #b7ebf1; height: 25px; text-align: center; display: inline; border-radius: 0px;" disabled="" placeholder="7">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; height: 25px; text-align: center; display: inline; border-radius: 0px;" maxlength="1" placeholder="8">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; height: 25px; text-align: center; display: inline; border-radius: 0px;" maxlength="1" placeholder="9">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; height: 25px; text-align: center; display: inline; border-radius: 0px;" maxlength="1" placeholder="10">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; height: 25px; text-align: center; display: inline; border-radius: 0px;" maxlength="1" placeholder="11">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; height: 25px; text-align: center; display: inline; border-radius: 0px;" maxlength="1" placeholder="12">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; background: #b7ebf1; border: 1px solid #b7ebf1; height: 25px; text-align: center; display: inline; border-radius: 0px;" disabled="" placeholder="13">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; height: 25px; text-align: center; display: inline; border-radius: 0px;" maxlength="1" placeholder="14">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; background: #b7ebf1; border: 1px solid #b7ebf1; height: 25px; text-align: center; display: inline; border-radius: 0px;" disabled="" placeholder="15">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; background: #b7ebf1; border: 1px solid #b7ebf1; height: 25px; text-align: center; display: inline; border-radius: 0px;" disabled="" placeholder="16">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; height: 25px; text-align: center; display: inline; border-radius: 0px;" maxlength="1" placeholder="17">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; background: #b7ebf1; border: 1px solid #b7ebf1; height: 25px; text-align: center; display: inline; border-radius: 0px;" disabled="" placeholder="18">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; background: #b7ebf1; border: 1px solid #b7ebf1; height: 25px; text-align: center; display: inline; border-radius: 0px;" disabled="" placeholder="19">
<input type="text" style="width: 25px; padding: 10px 0px 10px 0px; background: #b7ebf1; border: 1px solid #b7ebf1; height: 25px; text-align: center; display: inline; border-radius: 0px;" disabled="" placeholder="20">
</div>
<?php
require_once 'admin/connection.php';
$result = mysql_query('SELECT * FROM time WHERE 1');
$row = mysql_fetch_assoc($result);
$date= $row['time'];
?>
<span style="font-size: 16px;"><b>Ends in:</b>  <span id="target" style="font-size: 18px;"></span></span>
<br><br>
<span style="font-size: 16px;"><b>You Save:</b>  <span style="font-size: 16px; color: #B12704;">$125.00 (25%)</span></span>
<script>
var target_date = new Date("2019-08-06").getTime(); // установить дату обратного отсчета из php
var days, hours, minutes, seconds; // переменные для единиц времени
var countdown = document.getElementById("target");
setInterval(function () { getCountdown(); }, 1000);
function getCountdown(){
var current_date = new Date().getTime();
var seconds_left = (target_date - current_date) / 1000;
days = pad( parseInt(seconds_left / 86400) );
seconds_left = seconds_left % 86400;
console.log(seconds_left);
hours = pad( parseInt(seconds_left / 3600) );
seconds_left = seconds_left % 3600;
minutes = pad( parseInt(seconds_left / 60) );
seconds = pad( parseInt( seconds_left % 60 ) );
countdown.innerHTML = "<span>д:" + days + "</span> - <span>ч:" + hours + "</span> - <span>м:" + minutes + "</span> - <span>с:" + seconds + "</span>";
}
function pad(n) {
return (n < 10 ? '0' : '') + n;
}
</script>
<?php
require_once 'admin/connection.php';
$result = mysql_query('SELECT * FROM time WHERE 1');
$row = mysql_fetch_assoc($result);
$count = $row['time'];
echo $count;
?>
<?php
require_once 'admin/connection.php';
$result = mysql_query('SELECT * FROM time WHERE 1');
$row = mysql_fetch_assoc($result);
$count = $row['time'];
?>
<script>
// Set the date we're counting down to
var countDownDate = <?php echo $count; ?>;
//var countDownDate = new Date("November 5, 2020 15:37:25").getTime();
// Update the count down every 1 second
var x = setInterval(function() {
// Get today's date and time
var now = new Date().getTime();
// Find the distance between now and the count down date
var distance = countDownDate - now;
// Time calculations for days, hours, minutes and seconds
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Output the result in an element with id="demo"
document.getElementById("demo").innerHTML = minutes + "m " + seconds + "s ";
// If the count down is over, write some text
if (distance < 0) {
clearInterval(x);
document.getElementById("demo").innerHTML = "EXPIRED";
}
}, 1000);
</script>