【问题标题】:Change doctype in GWT更改 GWT 中的文档类型
【发布时间】:2013-05-19 15:54:15
【问题描述】:

我有一个 GWT MVP 应用程序,我使用 FormFactor 来确定要为移动设备、平板电脑或台式机服务的应用程序版本。

我的问题是因为 IE 的移动版本需要不同的文档类型才能正常工作。 在提供应用程序之前如何更改文档类型?

【问题讨论】:

    标签: gwt gwt-mvp


    【解决方案1】:

    这可能会改变,使用脚本。

    检测用户代理,然后应用以下代码... var newDoctype = document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdd');

    document.doctype.parentNode.replaceChild(newDoctype,document.doctype);

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-18
      • 2011-03-06
      • 1970-01-01
      • 2010-09-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多