1

ヘッドにメタ タグを追加するための単純な JavaScript コードがあります。Iphone では正常に動作しますが、ウィンドウ フォンでは動作しません。どんな助けでも

<html>
<head>

    <title>Hi there</title>
    <script type="text/javascript" src="jquery.js"></script>
    <script>
        (function () {
            if ( navigator.userAgent.match(/IEMobile\/10\.0/)) {
                $("head").append('<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no" />');
                alert("done");
            }
        })();
    </script>
</head>
<body>
    <div style="width:100%; height:100px; background:green; color:white;">
        Hi this is just the sample
    </div>
</body>


</html>
4

0 に答える 0