开发者

Search on <object data>

I need to perform a search for a particular word in a file that i have embedded using

  <object data = "".....>

How am i able to reference the

  <object data> 

just like in

 开发者_Go百科   <iframes>...

   window.frames['iframe id'];


Use getElementsByTagName? My quick test:

<object data="http://www.google.com"></object>
<object data="2"></object>

And:

<script>
var el = document.getElementsByTagName('object');

console.log( el[0].data ); // http://www.google.com
console.log( el[1].data ); // http://localhost/2
</script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜