使用jquery输入掩码 [英] Input Masking by using jquery

查看:82
本文介绍了使用jquery输入掩码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误:



行: 11  
错误:' jQuery'未定义





index.html

======================



 <  !DOCTYPE     html  >  
< span class =code-keyword>< html >
< head >
< title > < / title >
< meta charset = utf-8 / >
< script 类型 = text / javascript src = 〜/ Scripts / jquery-1.10.2.js > < ; / script >
< script type = text / javascript src = 〜/ Scripts / jquery.maskedinput。 min.js > < / script >
< script type = text / javascript >
jQuery(function($){
$(#date)。mask(9999-99-99);
});
< / script >
< / head >
< body > ;
< 输入 名称 = date type = text id = date va lue = / >

< ; / body >
< / html >







我需要帮助来解决这个错误

解决方案

){


( #日期)掩模( 9999-99-99);
});
< / script >
< / head >
< body > ;
< 输入 名称 = date type = text id = date va lue = / >

< ; / body >
< / html >







我需要帮助来解决这个错误


使用美元符号而不是单词jQuery。并删除函数声明中的美元符号。


I got this error:

Line: 11
Error: 'jQuery' is undefined



index.html
======================

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="utf-8" />
    <script type="text/javascript" src="~/Scripts/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.maskedinput.min.js"></script>
    <script type="text/javascript">
        jQuery(function ($) {
    $("#date").mask("9999-99-99");
    });
    </script>
</head>
<body>
    <input name="date" type="text" id="date" value="" />

</body>
</html>




I need help to solve this error

解决方案

) {


("#date").mask("9999-99-99"); }); </script> </head> <body> <input name="date" type="text" id="date" value="" /> </body> </html>




I need help to solve this error


Use the dollar sign instead of the word jQuery. And remove the dollar sign inside your function declaration.


这篇关于使用jquery输入掩码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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