开发者

html5 required not working on android 2.1

开发者 https://www.devze.com 2023-03-31 13:59 出处:网络
I have code that is working good in chrome, safari firefox. But when I upload to server abd view on mobile the input with the required field doesn\'t fire the \'please fill in a the fields message\'.

I have code that is working good in chrome, safari firefox. But when I upload to server abd view on mobile the input with the required field doesn't fire the 'please fill in a the fields message'. Totally ignores it. Can someone help me understand what I am doing wrong. I am using jquery mobile 1.02b.

for(var a = 0;a < $(this).val();a++) {
 $("#boxnumber").append('<div data-role="fieldcontain"><label for="boxamount" class="ui-input-text">Enter box ' + (a + 1) + ' number:</label><input开发者_运维技巧 type="text" name="boxamount-' + a + '-no" id="boxamount-' + a + '-no" class="boxamount ui-input-text ui-body-null ui-corner-all ui-shadow-inset ui-body-a" required /></div>')
      }


There is nothing wrong with what you are doing. It's simply not supported on Android yet.

But since you are using jQuery already, you might want to try out h5Validate for simulating HTML5 Form Validation support.

You can also try out html5test.com for details of HTML5 support of your browser.

0

精彩评论

暂无评论...
验证码 换一张
取 消