开发者

How to add doctype in html page using JavaScript or jQuery

I want to add a doctype for my particular page. How can I add it using JavaScript or jQuery?

I want to add <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd"> using J开发者_如何学编程avaScript.


You cannot add a DOCTYPE to the current document(or modify it).

From the MDN-docs: doctype is a read-only property.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜