问题描述
我已经开始使用jQuery Mobile和对由于缺乏HTML5支持Android验证,开发,以为我会尝试h5Validate。现在尝试,因为我可能,我不能得到这个工作。我已经张贴了我的输入,如果有人可以只显示我加价为了这个,我将不胜感激。谢谢
h5Validate链接:
HTML
< DIV数据角色=fieldcontain>
<标签=滑块>无箱*< /标签>
<输入类型=范围NAME =滑块ID =滑盖数据-H5-ErrorID中=boxnumber称号=要求:请填写您的空格中。所需数据磁道主题=a值=0分=0最大=10需要/>
< / DIV>< DIV ID =boxnumber级=UI状态错误消息的风格=显示:无;数据主题=B>
剧本
<脚本>
$(文件)。就绪(函数(){
$('#登录)。h5Validate({
errorClass:黑
});
});
< / SCRIPT>
CSS
的.ui状态错误{
背景颜色:#BB1100;
颜色:白色;
}#login输入,标签{
浮动:左;
}
。信息 {
保证金左:1EM;
宽度:20em;
边框:1px的;
填充:2px的;
浮动:左;
字体大小:10PT;
}
。黑色 {
背景颜色:#111111;
颜色:银色;
}
新的输入类型正由h5Validate忽略。我固定的。如果您仍然有问题,让我知道。你可以在这里提交错误门票:的
尝试升级到最新的h5Validate。
I have started to develop using jQuery mobile and for validation on the android because of lack of html5 support, thought I would try h5Validate. Now try as I might, I cannot get this to work. I have posted my inputs and if someone could just show me a mark-up for this I would be grateful. Thanks
h5Validate link:
http://ericleads.com/h5validate/?name=
html
<div data-role="fieldcontain">
<label for="slider">No of Boxes *</label>
<input type="range" name="slider" id="slider" data-h5-errorid="boxnumber" title="Required: Please enter your box(es)." required data-track-theme="a" value="0" min="0" max="10" required />
</div>
<div id="boxnumber" class="ui-state-error message" style="display:none;" data-theme="b">
script
<script>
$(document).ready(function () {
$('#login').h5Validate({
errorClass:'black'
});
});
</script>
css
.ui-state-error {
background-color:#BB1100;
color:white;
}
#login input, label {
float:left;
}
.message {
margin-left:1em;
width:20em;
border:1px;
padding:2px;
float:left;
font-size:10pt;
}
.black {
background-color:#111111;
color:silver;
}
The new input types were being ignored by h5Validate. I've fixed that. If you still have trouble, let me know. You can file bug tickets here: https://github.com/dilvie/h5Validate/issues?sort=created&direction=desc&state=open
Try upgrading to the latest h5Validate.
这篇关于jQuery Mobile的h5Validate帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!