jwplayer网站建议您以这种方式在javascript中嵌入jwplayer:
jwplayer("videoDIV").setup({
file: "vid.flv",
height: 300,
width: 400,
//Etc...
然而,当我在ASP.NET中尝试时,我得到了
Uncaught TypeError: Cannot call method 'setup' of null
我应该能够像变量一样调用jwplayer
,只要我有<script src...
内容就可以访问它,对吧?
错误显示在jwplayer("videoDIV").setup({
行
答案 0 :(得分:1)
我发现了为什么会这样。
当您致电jwplayer(string)setup()
时,需要的字符串将成为您html中该名称的div。