如何从一个网页调用功能到另一网页? [英] How to call a function from one webpage to other page?

查看:134
本文介绍了如何从一个网页调用功能到另一网页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

如何从一个网页调用功能到另一页?

谢谢

Hi all,

How to call a function from one webpage to other page?

Thanks

推荐答案

您将需要提供更多信息才能获得更清晰的响应.您是在谈论客户端还是服务器端?您正在使用MVC框架吗?

在MVC中这很简单,但是我们不认为服务器端函数是页面(它们是带有函数的类).

如果是客户端程序,最好的选择是将JavaScript移到一个单独的文件中并将其包含在两个页面中.

干杯.
You''re going to need to give more information for a clearer response. Are you talking about the client side, or the server side? And are you using the MVC framework?

This is pretty trivial in MVC, but we don''t think of server-side functions as pages (they are classes with functions).

If it''s client-side thing, your best bet is to move the JavaScript to a separate file and include it in both pages.

Cheers.


这篇关于如何从一个网页调用功能到另一网页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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