如何在javascript警报中使用资源文件中的文本而不使用隐藏字段 [英] how to use text from resource files in javascript alert without using hidden fields

查看:78
本文介绍了如何在javascript警报中使用资源文件中的文本而不使用隐藏字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,





现在我使用隐藏字段在javascript中显示警报文本,但是有什么方法可以获得来自资源文件的值并在警报时显示而不使用应支持全球化和本地化概念的隐藏字段





谢谢




For now am using hidden fields to show the alert text in javascript,but is there any way to get the values from resource files and show on alert without using hidden fields which should support globalization & localization concept


Thanks

推荐答案

排序,但资源文件驻留在服务器上,因此仍然需要调用服务器。



如果您想要提醒()您需要将其存储在隐藏字段或cookie中的本地化值,或者调用Web服务来获取值。使用jQuery的.ajax()调用webservice很容易。
Sort of, but resource files reside on the server and therefore would still have to call into the server.

If you want to alert() a localized value you either need to store it in hidden field or cookie or call a webservice to get the value. Calling webservice is easy using jQuery's .ajax().


这篇关于如何在javascript警报中使用资源文件中的文本而不使用隐藏字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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