1

ipod safari での iframe の動作に混乱しています。サンプルの html ページ「index.html」を作成し、touchstart/touchmove/touchend イベントを追加します。ipod safariで試してみます。

ダブルタップを使用してコンテンツ ページを拡大し、異なる document.body.clientWidth と document.body.clientHeight を表示します。

iframe を含む別のページ「iframe.html」を作成します。私はそれを試して拡大しましたが、同じ document.body.clientWidth/document.body.clientHeight を表示しますか? この問題についてはわかりません。何かアイデアがあれば、私とあなたのアイデアを共有してください。ありがとう。

「iframe.html」の内容:

<iframe src="index.html" id="mainFrame"> </iframe>

「index.html」の内容:

var targetToucheSize = 0; 
function handleStart(evt) { ... } 
function handleMove(evt) { ... }
function handleEnd(evt) { 
    var winW; 
    var winH; 
    if (targetToucheSize == 2) {
        if (!document.all) { 
            winW = window.innerWidth; 
            winH = window.innerHeight;
        } else { 
            winW = document.body.clientWidth; 
            winH = document.body.clientHeight; 
        } 
        alert(" winW " + winW + " winH " + winH); 
    } 
}
4

0 に答える 0