NLV
NLV

Reputation: 21641

Adding a Doctype to the document dynamically using JavaScript

I want to detect whether a doctype exists for the current document and add one if nothing exists.

I'm able to check whether a doctype exists using document.doctype. But how can i add one?

Upvotes: 1

Views: 940

Answers (1)

Anthony Mills
Anthony Mills

Reputation: 8784

I don't think it's possible to change the page mode from within the page. Sorry.

Upvotes: 3

Related Questions