Add javascript variable to javascript src?

后端 未结 5 806
暗喜
暗喜 2021-01-19 19:38

this may sound a bit noobish, but I\'m trying to retrieve the video information for a YouTube video (I saw in some tutorial) basically here\'s the code

             


        
5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-19 19:47

    Where is the code snippet within the page? If it's inside a ");

    The script tag needs to be written in javascript to access the vidid variable, but that means you have to manipulate the DOM in order to add the script tag since you're no longer in HTML.

提交回复
热议问题