jQuery JSON未定义 [英] JQuery JSON Undefined

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

问题描述

我正在使用此处找到的jMask iMask插件.这是我的代码:小提琴

I'm using the jquery iMask plugin found here. Here is my code: fiddle

运行时
1)它不能正常工作.手机的输入没有像我设置的那样被掩盖
2)控制台显示错误:

When I run it
1) it doesn't work correctly. The input for phone is not masked like i set it up
2) the console displays the error:

Uncaught ReferenceError: Json is not defined fiddle.jshell.net:1

这是什么错误,我该如何解决?谢谢

What is this error and how do I fix it? Thanks

推荐答案

它不是jQuery插件,而是mootools插件.

It's not a jQuery plugin, it's a mootools plugin.

使用jQuery端口代替 https://github.com/cwolves/jQuery-iMask

http://jsfiddle.net/GtQKh/9/

$(document).ready(function(e) {
   $('#phone').iMask({  
     type:'fixed',  
     mask:'(999) 999-9999',  
     stripMask: false
   });
});​

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

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