在 VS2003中,使用下面的JS+flash轮播图片,为什么图片不显示???请指教??
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/photoFlash/focus2.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
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+'">');
document.write('<embed src="images/photoFlash/focus2.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/photoFlash/focus2.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
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+'">');
document.write('<embed src="images/photoFlash/focus2.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
解决方案 »
- 关于qvod视频网站建设和盈利模式的疑问
- asp.net无法更新数据库的问题
- 请问如何实现这样的效果!
- fileupload控件怎么控制文件类型和大小
- 框架中 session老是提前过期,真晕倒了
- 高手请教理论知识--asp.net今天面试,面试管问的两个题目
- 大侠帮忙啊,一个小功能问题
- IP的问题,并且我用100分来反日,朋友门,你们留那么多的分干什么呀,那出来反日吧,振奋一个中国人的锐气
- 数据查询问题?
- 为什么在win2003中无法上传文件呀!急 急
- 如果判断网址是从百度来,还是其他网站连接过来的?
- HttpContext.Request.ContentLength的长度,怎么能够修改这个默认值
哎。又是你在用VS2003.呵呵。你看下document.write(value);
去网上找个现成的吧
{
if(document.getElementById('PNewsID'+i).value=="")
{
if(i==0)
{
document.write("没有新闻图片");
}
break;
}
else
{
array=document.getElementById('PNewsID'+i).value.split(";");
temp1="getImageNew.ashx?id="+array[0];
temp2=array[1];
temp3=escape("../ui/Home/ImageNews.aspx?id="+array[0]);
if(i==0)//第一张有图片
{
pics=temp1; //图片地址
texts=temp2; //文章标题
links=temp3; //链接地址
}
else
{
pics+="|"+temp1;
texts+="|"+temp2;
links+="|"+temp3;
}
}
}
var focus_width=275; //图片宽度
var focus_height=235; //图片高度
var text_height=18; //文字部分的高度
var swf_height=focus_height+text_height; //总高度
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/photoFlash/focus2.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
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+'">');
document.write('<embed src="images/photoFlash/focus2.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
把要输出的内容用隐藏域PNewsID接收了,document.write输出的pic,text,link的值也都有,现在就是图片完全不显示,其他的都能显示,不明白是啥原因??
注意权限,路径,图片格式。这3个没问题一般就可以显示的。
1,权限
<configuration>
<location path="图片文件夹">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
</configuration>
2,输入绝对路径进行测试,就知道是不是路径问题了
3,格式一般必须是jpg,并且Photoshop打开后,图像模式必须是RGB