Javascript和W3C有效性? [英] Javascript and W3C validity?
本文介绍了Javascript和W3C有效性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个印象,使用javascript经常会打破W3C xhtml / css的有效性。这是真的?如果是这样,为什么,我有没有办法在我的网页中使用javascript,仍然有W3C有效(html,xhtml,css)?
I have the impression that the use of javascript often breaks W3C xhtml/css validity. Is this true? If so, why and is there a way for me to use javascript in my webpages and still have them be W3C valid (html, xhtml, css)?
推荐答案
如果您将JavaScript包装在 //<![CDATA [
]标记中,它将验证
If you wrap your javascript in a //<![CDATA[
tag it will validate
https://developer.mozilla.org/en/properly_using_css_and_javascript_in_xhtml_documents
这篇关于Javascript和W3C有效性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文