1
這工作在我所有的測試瀏覽器:iPhone檢測縮放 - 幫助!
<body onresize="handleResize()">
// Aint perfect, but works well enough!
function handleResize()
{
// Document.ready sets initialWidth = window.innerWidth;
var zoomAmount = Math.round((initialWidth/window.innerWidth) * 100);
$('#db').html(zoomAmount);
}
在iPhone上,當我用兩個手指來放大和縮小,不更新這個數字。
如何在iPhone用戶放大時觸發事件?