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 JavaScript.
You cannot add a DOCTYPE to the current document(or modify it).
From the MDN-docs: doctype is a read-only property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With