更改 Domino 生成 HTML 页面的 DOCTYPE

发布时间:2020-07-30 07:46:39 作者:liuer338
来源:网络 阅读:1526

浏览器都有怪癖模式(Quirks Mode)和标准模式(Standards Mode)。怪癖模式是为了兼容老旧的网页,去模拟早期浏览器(如 IE5.5)的非标准实现;而标准模式会尽可能的按照标准去执行。而激活不同模式的关键正是 HTML 页面的 DOCTYPE。

 

        Domino 生成的默认的 DOCTYPE 还是:

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>

在目前所有流行的浏览器下它都会触发怪癖模式,问题的解决需要修改到doctype。下面是相应说明与修改方法:

/*******************这部分摘自 What’s new in Notes/Domino 7.0.2***********开始***************/

User-defined HTML tag attributes
User-defined attributes can now be added to the <HTML> tag generated by the web engine. When the field $$HTMLTagAttributes is present on a form, its contents are placed in the attribute list of the <HTML> tag. For more information, see “Additional HTML-related field attributes” in these release notes

Custom <!DOCTYPE> declaration
Users can now specify a custom <!DOCTYPE> declaration on a per form basis. When the field$$HTMLFrontMatter is present on a form, its contents will be placed in the generated HTML, ahead of the <html> tag, and the web server will not generate anything there automatically. For more information, see “Additional HTML-related field attributes” in these release notes

/*******************这部分摘自 What’s new in Notes/Domino 7.0.2***********结束***************/

可以看到新版本提供了一个表单域来控制doctype。不过,在Domino7.02后的版本中才支持这个域,在之前的版本中只能在notes.ini中添加参数:DominoCompleteDoctype解决。
具体参数值:
0 = <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>

1 = <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “” title=”http://www.w3.org/TR/html4/loose.dtd”>”>http://www.w3.org/TR/html4/loose.dtd”>

2 = <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “” title=”http://www.w3.org/TR/html4/strict.dtd”>”>http://www.w3.org/TR/html4/strict.dtd”>

 

我们只是想要触发标准模式,那么用 1 就可以了。不过由于是通过 Notes.ini 修改的,肯定会影响到所有的表单,想要更改个别的表单可以使用 $$HTMLFrontMatter 域。

 

推荐阅读:
  1. JavaScript动态更改CSS页面样式的方法
  2. 使用CSS更改占位符颜色的方法

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

domino doctype mi

上一篇:DHCP协议详解及实验

下一篇:oracle密码文件的重建

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》