Вход Регистрация
Файл: module-assets/admin/validation/demo/jquerymobile.html
Строк: 48
<?php
<!DOCTYPE html>
<
html>
    <
head>
    <
title>My Page</title>
    <
meta name="viewport" content="width=device-width, initial-scale=1">
    <
link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
    <
script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <
script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
    <
script src="../jquery.validate.js"></script>
    <
style>
        
label.error {
                
colorred;
                
font-size16px;
                
font-weightnormal;
                
line-height1.4;
                
margin-top0.5em;
                
width100%;
                
floatnone;
        }

        @
media screen and (orientationportrait){
                
label.error margin-left0displayblock; }
        }

        @
media screen and (orientationlandscape){
                
label.error displayinline-blockmargin-left22%; }
        }

        
em colorredfont-weightboldpadding-right.25em; }
    </
style>
</
head>
<
body>

    <
div id="page1" data-role="page">

        <
div data-role="header">
            <
h1>Welcome</h1>
        </
div>

        <
div data-role="content">
            <
form method="GET">
                <
div data-role="fieldcontain">
                    <
label for="email">Email:</label>
                    <
input type="email" name="email" id="email" />
                </
div>
                <
div data-role="fieldcontain">
                    <
label for="password">Password:</label>
                    <
input type="password" name="password" id="password" />
                </
div>
                <
input data-role="submit" type="submit" value="Login" />
            </
form>
        </
div>

    </
div>

    <
script>
        $(
'#page1').bind('pageinit', function(event) {
            $(
'form').validate({
                
rules: {
                    
email: {
                        
requiredtrue
                    
},
                    
password: {
                        
requiredtrue
                    
}
                }
            });
        });
    </
script>
</
body>
</
html>
?>
Онлайн: 0
Реклама