0

In MVC there are 2 view say:

  View-A contains A.js which further contains function A()

  View-B contains B.js which further contains function B()

Now I want to call function A() from View-B's B.js file

What i can`t do :-

     #1 I can`t embed A.js into View-B
     #2 I can`t embed A.js into _Layout.cshtml

If this is possible then pls tell me how?

4

1 回答 1

0

您可以getScript在视图 B中使用

$.getScript('jsfile.js',function(){
  //call function A 
});
于 2012-05-27T12:23:07.387 回答