且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在MVC控制器中使用外部javascript文件

更新时间:2023-02-13 08:10:09

<script src="~/_scripts/dtAddress_v10_r1.js"></script>
<script>
     // Example calling your function
     var result = dtDecode_Zip('{your-url}');
</script>





这是我最终使用的解决方案。它使我能够使用JS文件中的所有函数并执行和返回值。感谢大家的帮助。我想如果我不会遇到这个解决方案,我肯定会选择一个Web服务来完成这项工作



This was the solution that I finally ended up using. It made it able for me to use all of the functions in the JS file and execute and return values. Thank you all for your help. I think if I wouldn't have come across this solution I would have definitely gone with a web service to do the job