专注前端素材!
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.css"> <script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script> <script src="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> </head> <body> <div data-role="page"> <div data-role="header"> <h1>欢迎访问我的主页</h1> </div> <div data-role="main" class="ui-content"> <a href="#myPopup" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all ui-icon-check ui-btn-icon-left">弹窗中使用表单</a> <div data-role="popup" id="myPopup" class="ui-content" style="min-width:250px;"> <form method="post" action="demoform.php"> <div> <h3>登录信息</h3> <label for="usrnm" class="ui-hidden-accessible">用户名:</label> <input type="text" name="user" id="usrnm" placeholder="用户名"> <label for="pswd" class="ui-hidden-accessible">密码:</label> <input type="password" name="passw" id="pswd" placeholder="密码"> <label for="log">保存登录</label> <input type="checkbox" name="login" id="log" value="1" data-mini="true"> <input type="submit" data-inline="true" value="登录"> </div> </form> </div> </div> <div data-role="footer"> <h1>底部文本</h1> </div> </div> </body> </html>
运行结果