Razor查看jquery简化 [英] Razor view jquery simplification

查看:57
本文介绍了Razor查看jquery简化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

最近我在MVC4 Razor视图中工作,它完全依赖于Jquery ajax函数来调用Action方法。单个页面包含多个要使用的Jquery ajax方法。我的查询是,是否可以简化jquery函数或如何减少代码段?

我的确切问题是可以将jquery方法移动到单独的.Js文件中吗?



问候

Karthikeyan Mathiyalagan

Hello guys,
Recently i am working in MVC4 Razor view,it's fully depended on Jquery ajax function to call Action method.single page contain more than one Jquery ajax method to be used. my query is if it's possible to simplification the jquery functions or how to reduce the code segment?.
my exactly question is can move the jquery method to separate .Js file?

Regards
Karthikeyan Mathiyalagan

推荐答案





是的,你可以这样做,并使用脚本标签在你的视图中引用该文件。
Hi,

Yes you can do that and refer that file in your View using script tag.


这篇关于Razor查看jquery简化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆