[英]How do I call a defined function in another Javascript
Here is the code in languageSwitcher.js 这是languageSwitcher.js中的代码
$('#selectlanguage').change(AnyFunctionfromAnotherJsFile);
I do not want to make AnyFunctionfromAnotherJsFile as global function. 我不想使AnyFunctionfromAnotherJsFile作为全局函数。
This waits for on change and runs a function that calls setButtonText(); 这等待更改,并运行一个调用setButtonText()的函数;
$('#selectlanguage').change(function(){
setButtonText();
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.