[英]Getting a Namespace Not A function Error in Javascript
我收到此錯誤
Uncaught TypeError: Object #<Object> has no method 'namespace' bellmedia.videoHub.videoPlayer.js:2
(anonymous function)
這是我在Web控件中的代碼的一小段
$(document).ready(function() {
player = BellMedia.videoHub.videoPlayer({
destinationCode: globalDestination,
platformCode: globalPlatform,
我單擊了查看源,確實包含了bellmedia.videoHub.videoPlaye.js文件,這是第2行定義名稱空間的內容
var BellMedia = BellMedia || {};
BellMedia.namespace('BellMedia.videoHub.videoPlayer');
為什么仍然抱怨它沒有名稱空間功能呢?
我解決了 事實證明,缺少名稱空間功能。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.