我要在网页的开头输出下面的东西,用JavaScript语言怎么写啊?和多特殊字符!
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">因为我在JS脚本里面判断浏览器的类型,如果是中文,则输出上面的东西这样网页都是中文的了,如何不是中文,则输出的文字都是英文的,都是在一个网页里实现的。
var la=navigator.browserLanguage.toLowerCase();
if(la=='zh-cn')
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">这段话是在<head>里面的!用JS怎么输出?