这样设置.
<meta http-equiv="Content-Type" content="text/html; charset=big5">Try..<title>SINA.com HK - 穝呼 翠</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<script>
alert('穝呼 翠')
</script>
<meta http-equiv="Content-Type" content="text/html; charset=big5">Try..<title>SINA.com HK - 穝呼 翠</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<script>
alert('穝呼 翠')
</script>
a.js文件里的提示信息是用中文繁体打上去的
html文档已经指定了big5还是不行,同样是乱码?htm代码如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>這是一個測試</title>
<script language=javascript src=a.js lang="zh-tw"></script>
</head><body><form method="POST" action="" onSubmit="return chk(this)" name=thisform>
<p><input type="text" name="cname" size="20">
<input type="submit" value="提交" name="B1"></p>
</form></body></html>----------------------------
a.js代码如下:<!--
function chk()
{
if(thisform.cname.value=="")
{
alert("對不起,請填寫您的姓名");
return false;
}
}
//-->
------------------------------------------------^^^^^^手误? script这样显示也正常啊.demo.htm<title>SINA.com HK - 穝呼 翠</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<script language=javascript src="aa/a.js"></script>a.jsalert('穝呼 翠');