未使用jquery.swfobject安装Flash时显示备用内容 [英] Display alternate content when Flash is not installed with jquery.swfobject

查看:121
本文介绍了未使用jquery.swfobject安装Flash时显示备用内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不使用Flash的情况下使用浏览器的jquery.swfobject插件显示替代HTML?我无法找到任何文档或示例显示如何做到这一点。

How can I display alternate HTML with the jquery.swfobject plugin for browsers without Flash? I'm unable to find any documentation or examples showing how to do this.

这是我的代码片段:

Here is a snippet of my code:

    <script type="text/javascript" language="Javascript" src="jquery.1.4.2.js"></script>
    <script type="text/javascript" language="Javascript" src="jquery.swfobject.1-0-9.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){

            $("#contentflash").flash({
                swf: "myswf.swf",               
                width: "100%",
                height: "100%",
                params: {
                    wmode: "opaque"
                }
            });

        });             
    </script>
</head>
<body>
<div id="contentflash"></div>


推荐答案

b
$ b

Try placing some content in the

<div id="contentflash"></div>



Like

<div id="contentflash">No flash here man !</div>

这个

This

$("#contentflash").flash 

替换了被定位的id #contentflash。

replaces the id #contentflash being targeted.

以下是例如的完整性。

这篇关于未使用jquery.swfobject安装Flash时显示备用内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆