* *なぜimはモバイルエンドで検証を取得できなかったのですか?ブラウザで検証を適用してもフィールドの検証を取得できませんが、モバイルで取得できませんでした。誰かが私に何が間違っているのか指摘できますか?
<!DOCTYPE html>
<html>
<head>
<title>first example</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/lib/cordova-2.0.0.js"></script>
<script type="text/javascript" src="js/lib/jquery.js"></script>
<script src="js/lib/jquery.mobile-1.1.1.js"></script>
<script type="text/javascript" src="js/lib/jqm.page.params.js"></script>
<script type="text/javascript" src="js/lib/jquery.validate.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src ="js/lib/jquery.validate.min.js"></script>
<script type="text/javascript" src="js/lib/additional-methods.min.js">
<script type="text/javascript" charset="utf-8" src="js/lib/helloworldjs/alldatabse.js"></script>
<script type="text/javascript">
$(document).ready(
function()
{ $("#formregistration").validate(
{ rules:{
usernameforreg:
{
required:true,
minlength:4,
maxlength:10
},
useremail:
{
required:true,
email:true
},
passwordforreg:
{
required:true,
minlength:8
},
retypepassword:
{
required:true,
equalTo:"#passwordforreg"
}
},
messages:{
usernameforreg:
{
required:"pls enter name",
minlength:$.format("Keep typing, at least {0} characters required!"),
maxlength:$.format("Maximum {0} characters allowed!")
},
useremail:
{
required:"pls enter email id",
email:"enter valid email id"
},
passwordforreg:
{
required:"pls enter password",
minlength:$.format("at least {0} characters required!")
},
retypepassword:
{
required:"pls confirm password",
equalTo:"both passwords must match"
}
}
});
$("#formlogin").validate(
{rules:
{username:
{
required:true,
minlength:4
},
password:
{
required:true,
minlength:8
}
},
messages:
{username:
{
required:"pls enter user name",
minlength:"pls enter atleast {0} characters"
},
password:
{
required:"pls enter password",
minlength:"password should be atleast {0} characters"
}
}
});
});
</script>
</head>
<body>
<div data-role="page" id="login">
<form name="login" id="formlogin" method="get" action="" accept-charset = "utf-8">
<div style="background-image: url(css/lib/images/purty_wood.png); background-color:#D3BEAC; height:50%; margin-top:200px; border:6px groove orange; width:100%; margin:0 auto;">
<label for="username">USER NAME:</label>
<input type="text" name="username" id= "usrname" placeholder="ali" size="10" style="color:#ff9900;" required></input> </br>
<label for = "password">PASSWORD:</label>
<input type = "password" name="password" id="usrpswd" placeholder="please enter your password" style="color:#ff9900;" required title="User name is required"></input></br>
<a href="#" id ="loginbtn" data-role="button" data-theme="b" data-mini="true" data-inline="true" onclick="doLogin1();" style= "width:120px;" "height:60px;" "float:right;">LOGIN</a>
<a href="#" id ="signupbtn" data-role="button" data-theme="b" data-mini="true" data-inline="true" onclick="showRegisterForm();" style="width:120px;" "height:60px;" "float:right;">SIGN UP</a>
</div>
</form>
</div>
<div data-role="page" id="registration">
<form name="" id="formregistration" method="get" action="">
<div style="background-image:url('/helloworld/assets/www/css/lib/images/purty_wood.png'); height:30%; border:3px solid-black; position:absolute; top:25%; left:25%; right:25%; width:350px;">
<label for="usernameforreg">USER NAME:</label>
<input type="text" name="usernameforreg" id="usrnameforreg" placeholder="pls enter your name" style="color:#ff9900;" required></input></br>
<label for="emailid">EMAIL ID:</label>
<input type="email" name="useremail" id="useremail" placeholder="please enter your email id" style="color:#ff9900;" required></input></br>
<label for="passwordforreg">PASSWORD:</label>
<input type="password" name="passwordforreg" id="passwordforreg" palceholder="pls enter your password" style="color:#ff9900;"></input></br>
<label for="retypepassword">RETYPE PASSWORD:</label>
<input type="password" name="retypepassword" id="retypepasswordforreg" palceholder="retype password" style="color:#ff9900;" classrequired></input></br>
<a href="#" id="submitbtn" data-role="button" data-theme="b" data-mini="true" onclick="registrationProcess();" style="width:120px;" "height:60px;" "float:center;">SUBMIT</a>
</div>
</form>
</div>
</body>
</html>