Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
$.post('datei.php', {height: imgHeight, width: imgWidth}, function(data){
alert(data);
});
function checkImgSizes($width,$height){
return "Mein Bild ist " . $width . " breit und " . $height . " hoch!";
}
if(isset($_POST['height']) && isset($_POST['width'])){
echo checkImgSizes($_POST['width'],$_POST['height']);
}
$(document).ready(function(){
var imgWidth = $('img').attr('width');
var imgHeight = $('img').attr('height');
$.post('datei.php', {height: imgHeight, width: imgWidth}, function(data){
if(data == true) $('element').addClass('lightbox');
});
});
function getMyTest($foo){
if($foo === 'bar') return true;
return false;
}
$.post('datei.php', {height: imgHeight, width: imgWidth}, function(data){
if(data == true) $('element').addClass('lightbox');
});
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<title>phptesty</title>
<script type="text/javascript">
$(document).ready(function(){
var imgWidth = $('img.detailbild').attr('width');
var imgHeight = $('img.detailbild').attr('height');
var imgHref = $('img.detailbild').attr('href');
$.post('./functions.php', {height: imgHeight, width: imgWidth, href: imgHref}, function(data){
if(data == true) $('a.detaillink').addClass('lightbox');
});
});
</script>
</head>
<body>
<a href="#" class="detaillink" ><img src="./img/colors.jpg" class="detailbild" alt=""></a>
</body>
</html>
<?php
$img['height'] = $_POST['height'];
$img['width'] = $_POST['width'];
$img['href'] = $_POST['href'];
$bimg['href'] = $img['href'];
if(file_exists($bimg['href'])) {
$bimg_array = getimagesize($bimg['href']);
if ($bimg_array[0] > $img['width'] OR $bimg_array[1] > $img['height']) {
return true;
} else {
return false;
}
} else {
return false;
}
?>