【问题标题】:JQuery Mobile validate method not workingJQuery Mobile 验证方法不起作用
【发布时间】:2012-05-03 03:24:36
【问题描述】:

我在我的 jqm 项目中使用了 jquery validate 插件(plugin page)。我包含了插件文件并在 pageshow 上设置了验证。这是我的 script.js 文件:

$("body").delegate("div[data-role*='page']", "pageshow", function(){

$("#error").message({type:"error"});
$("#info").message();

$("#home").validate();

});

我在布局中包含了这个文件:

 script(type='text/javascript', src='/javascripts/jquery.validate.min.js')
    script(type='text/javascript', src='/javascripts/script.js')

我将类添加到我的输入中

input.input.required.email(id='email',type='text',value='',placeholder='name@email.com',name='email')

但它不起作用。我有什么遗漏吗?

谢谢,

【问题讨论】:

    标签: jquery validation node.js jquery-plugins jquery-mobile


    【解决方案1】:

    jQuery Mobile 不支持验证插件。我花了一段时间才弄清楚这一点,但我必须自己写。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-11-23
      • 1970-01-01
      • 2013-04-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多