类型未在 asp.net mvc js 文件中定义
当我尝试注册名称空间时,出现错误类型未定义 在js文件中
Type.registerNamespace("OrganizationStructure");
OrganizationStructure.OrgStructure = function() {
this.orgStructureId = null;
this.name = null;
this.nodeList = null;
}
OrganizationStructure.OrgStructure.registerClass('OrganizationStructure.OrgStructure');
OrganizationStructure.Node = function() {
this.parent = null;
this.name = null;
this.list = null;
}
OrganizationStructure.Node.registerClass('OrganizationStructure.Node');
我不知道为什么会发生这个错误
i am getting an error type not defined when i try to register the name space
in the js file
Type.registerNamespace("OrganizationStructure");
OrganizationStructure.OrgStructure = function() {
this.orgStructureId = null;
this.name = null;
this.nodeList = null;
}
OrganizationStructure.OrgStructure.registerClass('OrganizationStructure.OrgStructure');
OrganizationStructure.Node = function() {
this.parent = null;
this.name = null;
this.list = null;
}
OrganizationStructure.Node.registerClass('OrganizationStructure.Node');
i dont know why this error occuring
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
registerNamespace
和registerClass
函数是 MS AJAX 框架的一部分,与 jquery 无关。那么问题是您想使用 MS AJAX 或 jquery 这两个框架中的哪一个?因此,如果您想使用这些函数,请确保已包含正确的文件:MicrosoftAjax.js
、MicrosoftMvcAjax.js
。registerNamespace
andregisterClass
functions are part of the MS AJAX framework and have nothing to do with jquery. So the question is which one of the two frameworks you would like to use MS AJAX or jquery? So if you want to use those functions make sure you have included the proper files:MicrosoftAjax.js
,MicrosoftMvcAjax.js
.