To test HTML5 to work in submit, you must put the required attribute in your input fields, you want to test the use of HTML5, and you must submit the form.
You can process the form data submitted through javascript, and if you want to process the submitted data manually, then you must specify data-ajax="false" in the form tag
For your code try
<div data-role="content"> <form id="form" data-ajax="false"> <div data-role="fieldcontain"> <label for="ip">IP Address/System Name</label> <input name="ip" id="ip" type="text" required pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$"> </div> <div style="text-align:center;"> <input type="submit" value="Submit button" /> </div> </form> </div>
And in javascript you can do something like
$("#form").submit(function(e){ e.preventDefault();
Trying Tobemyself
source share