<html>
<head>
</head>
<body>
<table cellpadding="0" cellspacing="0" id="1"><tr><td><style> 
#cal{width:240px;border:1px solid #c3d9ff;font-size:12px;margin:0px 0 0 0px}
#cal #top{height:29px;line-height:29px;background:#e7eef8;color:#003784;padding-left:0px}
#cal #top select{font-size:12px}
#cal #top input{padding:0}
#cal ul#wk{margin:0;padding:0;height:25px}
#cal ul#wk li{float:left;width:34px;text-align:center;line-height:25px;list-style:none}
#cal ul#wk li b{font-weight:normal;color:#c60b02}
#cal #cm{clear:left;border-top:1px solid #ddd;border-bottom:1px dotted 
#ddd;position:relative}
#cal #cm .cell{position:absolute;width:34px;height:30px;text-align:center;margin:0 0 0 0px}
#cal #cm .cell .so{font:bold 14px arial;}
#cal #bm{text-align:right;height:24px;line-height:10px;padding:0 1px 0 0}
#cal #bm a{color:7977ce}
#cal #fd{display:none;position:absolute;border:1px solid 
#dddddf;background:#feffcd;padding:1px;line-height:21px;width:150px}
#cal #fd b{font-weight:normal;color:#c60a00}
</style>
<!--[if IE]>
<style>
#cal #top{padding-top:4px}
#cal #top input{width:80px}
#cal #fd{width:180px}
</style>
<![endif]-->
<div id="cal">
<div id="top">公元&nbsp;<select></select>&nbsp;年&nbsp;<select></select>&nbsp;月<br>农历
<span></span>年&nbsp;[&nbsp;<span></span>年&nbsp;]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input 
type="button" value="回到今天" title="点击后跳转回今天" style="padding:0px"></div>
<ul id="wk"><li>一</li><li>二</li><li>三</li><li>四</li><li>五</li><li><b>六</b></li><li><b>
日</b></li></ul>
<div id="cm"></div>
<div id="bm"></div>
</div>
<script src="http://www.baidu.com/js/bdcalendar110.js"></td></tr></table>
</body>
</html>大家可以把以上代码保存到.htm里面看效果。显示完全正常的。
可是我把它放到我的网页中时,汉字都变成方框了,是怎么回事啊?
在百度和GOOGLE都没找到答案啊!

解决方案 »

  1.   

    我试验的也可以,问题就是,拖到我制作的网页上就不行,汉字全变方框。用iframe来显示也是变方框,但是直接打开.htm就没问题。谁知道这是什么原因啊?!
      

  2.   

    <meta http-equiv="content-type" content="text/html;charset=gb2312" />
    加上这个编码也没用的。
    如果加UTF-7或UTF-8就连.htm都显示不正常。。
      

  3.   


    http://hiphotos.baidu.com/ljlprc/pic/item/e9ec5ec560b962858026ac44.jpg
    这是截图。上面有正常显示的汉字,但是JS生成的汉字都是方框了……想知道为什么!
      

  4.   

    测试了没问题,在其他电脑是否正常
    加上
    <meta http-equiv="Content-Type" content="text/html; charset=gb232" />
      

  5.   

    不知道是哪里出了问题。我新建一个网站,然后放到.aspx页面里,结果显示正常了。
    但是在原来的网站里,怎么样也不正常,而且,如果放到iframe里面,就连本来能显示的几个汉字也变成方框了,额……
      

  6.   

    已经确认不是web.config的原因,正在找其他原因……
      

  7.   

    找到问题了,是编码的问题。下面的字用gb2312才能正常显示,可是上面的字必须用UTF-8才能正常显示。
    怎么办啊??!!!#¥#@#¥……!!@#¥#@