saran
saran

Reputation: 11

how can we add a doctype using javascript

i want to add doctype using javascript. when a doctype already exist i am able to modify it. but when it is null, not able to add new doctype.. how can i do it in JS

Upvotes: 1

Views: 1499

Answers (1)

Fenton
Fenton

Reputation: 250842

It is totally useless to add the doctype using JavaScript as the doctype will already have been decided before JavaScript gets a chance to add it to the page. Editing or adding a doctype using JavaScript will not cause the page to be rendered using the JavaScript-generated doctype.

Upvotes: 1

Related Questions