如何让遮罩层悬浮在object标签中
1个回答
展开全部
最近使用Flex做了一个图片预览的功能,想要实现当检测所选图片有效性时在整个页面出现一个遮罩层(使用了jQuery的mask插件)以使用户不能再进行其它操作(尤其是提交表单的操作),顺着这个思路把代码写好后测试时发现在其它浏览器中都好用,可是在IE浏览器中就不好用——object标签区域遮罩层不好使,代码如下:
[html] view plain copy
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="tempPictureUpload" width="150" height="188"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="<%=basePath %>js/previewPicture/previewPicture.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="flashVars" value="saveTempPictureURL=<%=basePath %>" />
<embed name="tempPictureUpload" src="<%=basePath %>js/previewPicture/previewPicture.swf"
quality="high" bgcolor="#869ca7" width="210" height="144" align="middle"
play="true" loop="false" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
flashVars="saveTempPictureURL=<%=basePath %>SaveTempPictureServlet"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
通过网络终于找到了解决问题的方法——在object标签中添加<param name="wmode" value="transparent">即可,修改后的代码如下:
[html] view plain copy
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="tempPictureUpload" width="150" height="188"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="<%=basePath %>js/previewPicture/previewPicture.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="wmode" value="transparent">
<param name="flashVars" value="saveTempPictureURL=<%=basePath %>" />
<embed name="tempPictureUpload" src="<%=basePath %>js/previewPicture/previewPicture.swf"
quality="high" bgcolor="#869ca7" width="210" height="144" align="middle"
play="true" loop="false" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
flashVars="saveTempPictureURL=<%=basePath %>SaveTempPictureServlet"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
[html] view plain copy
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="tempPictureUpload" width="150" height="188"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="<%=basePath %>js/previewPicture/previewPicture.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="flashVars" value="saveTempPictureURL=<%=basePath %>" />
<embed name="tempPictureUpload" src="<%=basePath %>js/previewPicture/previewPicture.swf"
quality="high" bgcolor="#869ca7" width="210" height="144" align="middle"
play="true" loop="false" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
flashVars="saveTempPictureURL=<%=basePath %>SaveTempPictureServlet"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
通过网络终于找到了解决问题的方法——在object标签中添加<param name="wmode" value="transparent">即可,修改后的代码如下:
[html] view plain copy
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="tempPictureUpload" width="150" height="188"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="<%=basePath %>js/previewPicture/previewPicture.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="wmode" value="transparent">
<param name="flashVars" value="saveTempPictureURL=<%=basePath %>" />
<embed name="tempPictureUpload" src="<%=basePath %>js/previewPicture/previewPicture.swf"
quality="high" bgcolor="#869ca7" width="210" height="144" align="middle"
play="true" loop="false" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
flashVars="saveTempPictureURL=<%=basePath %>SaveTempPictureServlet"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询