jQuery全球化 [英] Jquery Globalization

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

问题描述

我正在使用Microsift中的MVC4.0和Jquery全球化插件" http://www.scottgu我从"

I am using MVC4.0 and Jquery globalization plugin from Microsift "http://www.scottgu.com/blogposts/jQueryGlobalizationDemos.zip" which i got from "http://weblogs.asp.net/scottgu/archive/2010/06/10/jquery-globalization-plugin-from-microsoft.aspx". This plugin i am using for amount formating e.g

var result= $.format(1000, "c", "en-GB");

当我直接在页面(视图)上引用"glob.js"和"glob.all.js"文件时,此插件工作正常,但是当我在母版页上引用相同文件时,该插件崩溃Jquery.validate.js文件.

This plugin is working fine when i am giving reference to "glob.js" and "glob.all.js" files directly on page(View), but when i am giving reference to same files on master page its crashing in Jquery.validate.js file.

    $.each(params, function( i, n ) {
    source = source.replace( new RegExp("\\{" + i + "\\}", "g"), function() {
        return n;
    });
});

由于替换功能未定义,我遇到了错误.请帮我.

I am getting error as replace function is undefined. Please help me.

而且,最新版本的Microsoft Jquery Globalization插件的链接在哪里?

And, Where is the link for latest version of Microsoft Jquery Globalization plugin?

预先感谢

推荐答案

几年前,来自Microsoft的jQuery全球化插件已被接受为官方jQuery插件(

The jQuery globalization plugin from Microsoft has been accepted as a offical jQuery plugin a couple of years ago (http://blog.jquery.com/2010/10/04/new-official-jquery-plugins-provide-templating-data-linking-and-globalization/)

您可以在此处找到最新版本以及示例: https://github.com/jquery/globalize .

You can find the latest version here along with examples: https://github.com/jquery/globalize.

需要一个更完整的代码示例,以了解为什么收到错误.尝试在 http://jsfiddle.net/上显示它吗?

A more complete example of your code is needed to see why you get the error you get. Try to show it on http://jsfiddle.net/ maybee?

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

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