
转自:http://www.oschina.net/question/101738_29271
注册:

登录核心代码:
01 | <script type="text/javascript"> |
02 | jQuery(document).ready(function() { |
04 | $("input[id]").bind("focus",function () { |
05 | if($(this).attr("id")=='username'||$(this).attr("id")=='password') |
06 | $(this).attr("value",""); |
09 | $("#submit").bind("click", function() { |
13 | url: "http://localhost:8080/note/servlet/Login", |
14 | data: $("form#loginform").serialize(), |
15 | success: function(msg){ |
17 | $.mobile.changePage("content/first.html","slidedown", true, true); |
19 | $.mobile.changePage("content/loginfalse.html","slidedown", true, true); |
29 | if($("#username").attr("value")==''||$("#password").attr("value")=='') |
31 | $.mobile.changePage("content/loginfalse.html","slidedown", true, true); |
38 | <style type="text/css"> |
44 | float:right; margin:10px; |
47 | float:left; margin:10px; |
53 | <section id="page1" data-role="page"> |
54 | <header data-role="header" data-theme="b" ><h1>开始笔记之旅</h1></header> |
55 | <div data-role="content" class="content"> |
56 | <p style="backg"><font color="#2EB1E8" >登录微笔记</font></p> |
57 | <form method="post" id="loginform"> |
58 | <input type="text" name="username" id="username" value="用户名"/><br> |
59 | <input type="password" name="password" id="password" value="密码输入提示"/> |
60 | <fieldset data-role="controlgroup" > |
61 | <input type="checkbox" name="checkbox-1" id="checkbox-1" class="custom" /> |
62 | <label for="checkbox-1">保持登录状态</label> |
64 | <a href="content/regist.html" data-role="button" id="toregist" data-theme="e">注册</a> |
65 | <a data-role="button" id="submit" data-theme="b">登录</a> |
68 | <footer data-role="footer" ><h1>©2011 TinyNote 微笔记社区(movingcomputing.com)</h1></footer> |
注册核心代码:
01 | <script type="text/javascript"> |
02 | jQuery(document).ready(function() { |
04 | $("input[id]").bind("focus",function () { |
05 | if($(this).attr("value")=='用户名'||$(this).attr("value")=='密码') |
06 | $(this).attr("value",""); |
09 | $("#regist").bind("click", function() { |
13 | url: "http://localhost:8080/note/servlet/Login", |
14 | data: $("form#loginform").serialize(), |
15 | success: function(msg){ |
17 | $.mobile.changePage("../content/first.html","slidedown", true, true); |
19 | $.mobile.changePage("../content/loginfalse.html","slidedown", true, true); |
29 | <style type="text/css"> |
47 | <section data-role="page"> |
48 | <header data-role="header" data-theme="b" data-type="horizontal"> |
49 | <div data-role="controlgroup" > |
50 | <nav data-role="navbar"> |
52 | <li><a href="#page1" class="ui-btn-active">注册微笔记</a></li> |
53 | <li><a href="#page2">用手机号注册</a></li> |
58 | <div data-role="content" class="content"> |
59 | <form method="post" id="registform"> |
60 | <label for="email">邮 箱</label> |
61 | <input type="text" name="email" id="email"/> |
62 | <label for="password">密 码</label> |
63 | <input type="password" name="password" id="password"/> |
64 | <label for="nicky">昵 称</label> |
65 | <input type="text" name="nicky" id="nicky"/> |
66 | <fieldset data-role="controlgroup"> |
68 | <input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" checked="checked" /> |
69 | <label for="radio-choice-1">上班族</label> |
71 | <input type="radio" name="radio-choice-1" id="radio-choice-2" value="choice-2" /> |
72 | <label for="radio-choice-2">大学生</label> |
74 | <input type="radio" name="radio-choice-1" id="radio-choice-3" value="choice-3" /> |
75 | <label for="radio-choice-3">其他</label> |
78 | <a data-role="button" id="regist" data-theme="e">立即注册</a> |
技术有限,欢迎探讨。