我想在单击按钮时动态更改 Windows phonegap 应用程序中“index.html”中的元标记视口(viewport)。
我正在使用
- Windows 操作系统 8
- phonegap 3.5
- 设备 Nokia Lumia 1320 和 windows 8 操作系统
我想改变下面的元标记
<meta id="viewport" name="viewport" content="width=device-width">
到
<meta id="viewport" name="viewport" content="width=720">
我已经尝试过以下网址,但对 Windows Phone 没有任何效果。
how to set viewport so it is 380x800 or 800x380 depending on orientation?
Setting the Viewport to Scale to Fit Both Width and Height
我在这里找到了一个链接,上面写着无法在 winodws 8 操作系统中动态更改元标记
http://www.quirksmode.org/blog/archives/2011/06/dynamically_cha.html
最佳答案
尝试检测设备/操作系统并相应地更改元标记 http://www.sitepoint.com/detect-mobile-devices-jquery/
关于javascript - 如何在 windows phonegap 应用程序中加载页面后动态更改元标记视口(viewport)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26217809/