如何在netbeans jsp应用程序中设置浏览器兼容性
我正在制作一个基于 jsp Web 的应用程序,一些按钮和标签在 Internet Explore 中不可见,但在 google chrome 中却很好。我如何设置应用程序兼容性,以便用户可以在处理所有浏览器时很好地看到它
I'm making a jsp web based application some of the buttons and labels are not visible with internet explore but it is good with google chrome.How do i set application compatiblity so that user can see it in very good in handling with all browser
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
浏览器兼容性不依赖于Java/JSP代码,而是依赖于它生成的HTML/CSS/JS代码。作为一名 Web 开发人员,您通常应该对此拥有完全的控制权。如果您使用 HTML strict doctype 并根据 w3 标准编写 HTML 代码(即页面至少通过了w3验证器)并且你使用jQuery来编写JavaScript函数,那么你基本上什么都没有担心。
抛开 CSS,当您使用错误的 HTML 文档类型时,这可能会很痛苦,这会将 MSIE 推入所谓的 "怪异模式”(揭示了 MSIE 盒模型错误)。因此,您至少希望首先获得文档类型(首先,使用 HTML5
)。这应该可以解决大多数 MSIE CSS 问题,然后您可以单独修复其余的 CSS 问题。它经常涉及 IE6/7 CSS 特定的错误,这些错误归结为 hasLayout 错误。不可能在一个答案中详细阐述所有这些错误。为此,每当您坚持修复单个 CSS 问题时,您最好在这里提出一个单独的具体问题。
The browser compatibility is not dependent on the Java/JSP code, but on the HTML/CSS/JS code it generates. You, as being a web developer, should usually have full control over this. If you use a HTML strict doctype and write HTML code according the w3 standards (i.e. the page passes at least the w3 validator) and you use jQuery for writing JavaScript functions, then you have basically nothing to worry about.
Left behind CSS, this may be a pain when you use a wrong HTML doctype which pushes MSIE in the so-called "quirks mode" (which reveals the MSIE box model bug). So you'd like to get at least the doctype straight first (to start, use the HTML5
<!DOCTYPE html>
). This should solve most of MSIE CSS issues and you can then fix the remaining CSS issues individually. More than often it concerns IE6/7 CSS specific bugs which boils down to the hasLayout bug. It's impossible to elaborate all those bugs in detail in a single answer. For that you can better ask a separate and specific question here whenever you stucks with fixing an individual CSS issue.