jQuery引用<object>

rlb*_*usa 0 video jquery object

我在引用我的时候遇到了麻烦 <object>

这就是我所拥有的:

<div id="videoHolder1" style="display: none;">
  <object id="video1" data="http://vimeo.com/..." type="application/x-shockwave-flash">
    <param name="data" value="http://vimeo.com/..." />
    <param name="src" value="http://vimeo.com/..." />
    <param name="wmode" value="opaque" />
    <param name="allowscriptaccess" value="always" />
  </object>
</div>
Run Code Online (Sandbox Code Playgroud)

我试过这些:

alert($(".video1 embed").attr('src') );        // undefined 
alert($("#video1").attr('src') );              // undefined
alert( $("#video1" ).get(0).attr('src') );     // undefined
Run Code Online (Sandbox Code Playgroud)

Gre*_*reg 5

你想要<param>name ="src" 的元素的值吗?

// /-------------- Select tag with id=video1
// |       /------ Select child param tag
// |       |    /- Filter to tags with a "name" attribute with value "src"  
// |       |    |  
$("#video1 param[name=src]").attr("value") // return value of "value" attribute
Run Code Online (Sandbox Code Playgroud)