JQuery屏蔽的输入插件不工作在IE7 [英] JQuery masked input plugin does not work on IE7

查看:151
本文介绍了JQuery屏蔽的输入插件不工作在IE7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Jquery蒙版的输入插件
http://digitalbush.com / projects / masked-input-plugin /

I'm using Jquery Masked input plugin http://digitalbush.com/projects/masked-input-plugin/

根据更改日志,它应该支持IE7

According to the changelog it should support IE7

当尝试在IE7上使用它时它不工作,我在IE调试器中得到以下错误

When when trying to use it on IE7 It's does not work and I'm getting the following error in IE debugger

对象不支持属性或方法'mask'

我的代码:

$("#" + "someid").mask(someformat);

同样的代码适用于所有其他浏览器
,包括IE8及以上版本。

The same code work on all other browsers including IE8 and above.

推荐答案

对于IE7尝试使用版本1.2.2的masked-input
https:// zk-sample-code .googlecode.com / svn-history / r27 / trunk / WebContent / samples / sam / inputbox / js / jquery.maskedinput-1.2.2.js

For IE7 try to use version 1.2.2 of masked-input https://zk-sample-code.googlecode.com/svn-history/r27/trunk/WebContent/samples/sam/inputbox/js/jquery.maskedinput-1.2.2.js

$(function () {
   $("[name='in1']").mask("99/99/9999");
   $("[name='in2']").mask("99-99-99");  
});

示例: http://jsfiddle.net/ishubin/aVwpn/

这篇关于JQuery屏蔽的输入插件不工作在IE7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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