<div class="video">
<video id="bg-globe" loop muted autoplay playsinline class="fullscreen-bg_video hidden-xs" poster="img/world-preview.png">
<source src="video/world-header.webm" type="video/webm">
<source src="video/world-header.mp4" type="video/mp4">
<source src="video/world-header.3gp">
<!--<img src="img/world-preview.png">-->
</video>
</div>
<a href="http://www.сайт.ru">ДАЛЕЕ</a>
<a href="#" onclick="window.location.href = 'http://www.сайт.ru';">ДАЛЕЕ</a>
<a href="#" onclick="goToSite();">ДАЛЕЕ</a>
<script>
function goToSite() {
window.location.href = "http://www.сайт.ru";
}
</script>
<a href="#" onclick="goToSite('http://www.сайт.ru');">ДАЛЕЕ</a>
<script>
function goToSite(site_url) {
window.location.href = site_url;
}
</script>
var firstDate = '23.09.2016 22:20';
var secondDate = '01.10.2016 00:00';
var datetime_regex = /(\d\d)\.(\d\d)\.(\d\d\d\d)\s(\d\d):(\d\d)/;
var first_date_arr = datetime_regex.exec(firstDate);
var first_datetime = new Date(first_date_arr[3], first_date_arr[2], first_date_arr[1], first_date_arr[4], first_date_arr[5]);
var second_date_arr = datetime_regex.exec(secondDate);
var second_datetime = new Date(second_date_arr[3], second_date_arr[2], second_date_arr[1], second_date_arr[4], second_date_arr[5]);
if(first_datetime.getTime() > second_datetime.getTime()) {
console.log('первая дата больше');
} else {
console.log('вторая дата больше или даты равны');
}
<?php
function shortenNumber($number)
{
if ($number != 0 && $number % 1000 == 0) {
return $number/1000 . 'K';
}
return $number;
}
echo shortenNumber('1000'); // 1K
echo shortenNumber(123); // 123
echo shortenNumber(0); // 0
echo shortenNumber(-10000); // -10K
<?php
function shortenNumber($number)
{
return preg_replace('/000$/', 'K', $number);
}