getElementById not working in Google Chrome extension for <embed>

前端 未结 4 604
北海茫月
北海茫月 2021-01-07 12:52

In my Google Chrome extension content script I have the following:

jQuery(document).ready(function() {
    var player = document.getElementById(\'player\');
         


        
4条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-07 13:36

    Works fine for me in chrome 9.

    Try this fiddle: http://jsfiddle.net/Ee7mq/

    If the console doesn't show the player tag something is wrong with your browser. If it does, something is wrong with your code. To figure out what i'd need to see more of it.

提交回复
热议问题