如何在MVC4中的Cshtml页面中调用javascript函数 [英] how to call javascript function in Cshtml page in MVC4

查看:628
本文介绍了如何在MVC4中的Cshtml页面中调用javascript函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在sample1.cshtml页面中有一个javascript函数

I am having a javascript function in sample1.cshtml page

function abc()
{

}



我需要在其他一些Smple2.chhtml页面中调用此函数


I need to call this function in some other Smple2.chhtml page

推荐答案

你没有。服务器无法在客户端计算机上执行代码。
You don't. The server cannot execute code on the client machine.


这篇关于如何在MVC4中的Cshtml页面中调用javascript函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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