从WebService调用Javascript [英] Calling Javascript from WebService

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

问题描述



是否可以从webservice中的asmx.cs文件调用Javascript函数?如果我用它搜索,我会得到从Java调用Web服务"的结果.我需要的恰恰与此相反. "从Webservice调用Javascript".如果有人知道,请分享信息.

谢谢

Hi,

Is it possible to call Javascript function from asmx.cs file in webservice? If I google it, i''m getting results for ''Calling Webservice from Javascript''. What I need is exactly the opposite of this. ''Calling Javascript from Webservice''. Please share the info if anyone knows.

Thanks

推荐答案

Java语言主要用于Web开发,仅在客户端使用.使用所谓的服务器端Javascript"的可能性很小.

参见:
http://en.wikipedia.org/wiki/Server-side_JavaScript [ http://en.wikipedia.org/wiki/Comparison_of_server-side_JavaScript_solutions [ http://net.tutsplus .com/tutorials/other/how-to-to-create-a-web-service-in-a-matter-of-minutes/ [ http://lmgtfy.com/?q=%22server-side+javascript%22+%22Web+Service%22 [
Javascript language is predominantly used for Web development, on the client side only. There is a remote possibility to use what is called "Server-side Javascript".

See:
http://en.wikipedia.org/wiki/Server-side_JavaScript[^],
http://en.wikipedia.org/wiki/Comparison_of_server-side_JavaScript_solutions[^].

See also the Web references from these articles.

As far as I can see, Server-side Javascripts are quite exotic these days, as Javascript language, with all its flexibility, is a script language, not compilable one, it''s hard to debug and on the server side it hardly can compete with modern powerful server-side technologies, such as ASP.NET or, say, Python, Ruby, etc. Even though I can imagine the use of Server-side Javascript in development of Web application, it''s much harder to imagine what can you do with it for the development of the Web services which are not Web applications. However, such application do exist. Take a look at the first link I found:

http://net.tutsplus.com/tutorials/other/how-to-create-a-web-service-in-a-matter-of-minutes/[^].

I''m sure you will be able to find some more: http://lmgtfy.com/?q=%22server-side+javascript%22+%22Web+Service%22[^].

—SA


这可能有帮助,但不能保证:

http://nishantrana.wordpress .com/2008/08/13/taking-an-aspnet-web-service-using-soap-protocol-from-javascript/ [
This might help, but no guarantees:

http://nishantrana.wordpress.com/2008/08/13/consuming-an-aspnet-web-service-using-soap-protocol-from-javascript/[^]


这篇关于从WebService调用Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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