求解 embed FlashVars 中出现的中文乱码问题
想在页面上显示一个滚动显示图片的FLASH,部分代码如下:
//下面是.aspx中的代码
<div class= "flashShow " style= "text-align: left ">
<script type= "text/javascript "> showFlash(); </script>
</div>
//下面是JS中的部分代码
function showFlash()
{
var pics= 'img/flash/0.jpg|img/flash/1.jpg|img/flash/2.jpg|img/flash/3.jpg|img/flash/4.jpg|img/flash/5.jpg|img/flash/6.jpg|img/flash/7.jpg|img/flash/8.jpg '//图片地址
var links= 'index.aspx|index.aspx|index.aspx|index.aspx|index.aspx|index.aspx|index.aspx|index.aspx|index.aspx '//相对于图片的链接地址
var texts= '对外合作|对外合作|科技部缩小数字鸿沟交流会报告|信产局检查工作|信产局检查工作|信产局检查工作|菊花|枫叶|路在前方... '//标题文字
document.write( ' <object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 " codebase= "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 " width= " '+ focus_width + ' " height= " '+ swf_height + ' "> ');
document.write( ' <param name= "movie " value= "pixviewer.swf "> <param name= "quality " value= "high "> <param name= "bgcolor " value= "#ffffff "> ');
document.write( ' <param name= "menu " value= "false "> <param name=wmode value= "opaque "> ');
document.write( ' <param name= "FlashVars " value= "pics= '+pics+ '&links= '+links+ '&texts= '+texts+ '&borderwidth= '+focus_width+ '&borderheight= '+focus_height+ '&textheight= '+text_height+ '&text_align= '+text_align+ '&interval_time= '+interval_time+ ' "> ');
document.write( ' <embed src= "pixviewer.swf " wmode= "opaque " FlashVars= "pics= '+pics+ '&links= '+links+ '&texts= '+texts+ '&borderwidth= '+focus_width+ '&borderheight= '+focus_height+ '&textheight= '+text_height+ '&text_align= '+text_align+ '&interval_time= '+interval_time+ ' " menu= "false " bgcolor= "#ffffff " quality= "high " width= " '+ focus_width + ' " height= " '+ swf_height + ' " allowScriptAccess= "sameDomain " type= "application/x-shockwave-flash " pluginspage= "http://www.macromedia.com/go/getflashplayer " /> ');
document.write( ' </object> ');
}
页面中flash可以正常滚动显示图片,但图片下的文字(对外合作|对外合作|科技部缩小数字鸿沟交流会报告|信产局检查工作|信产局检查工作|信产局检查工作|菊花|枫叶|路在前方...)显示的都是乱码。
大家有没有碰到过这个问题,谢谢?
------解决方案--------------------可以将你的web.config里面的编码改成gb2312或者utf-8试试