vip.html页面实现过程

合集下载

html+css+js实现简单登陆注册页面

html+css+js实现简单登陆注册页面

html+css+js实现简单登陆注册页⾯先看⼀下最终效果,登陆和注册背景图⽚:附源码:login.html<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>login</title><style>* {margin: 0;padding: 0;}html {height: 100%;width: 100%;overflow: hidden;margin: 0;padding: 0;background: url(Desert.jpg) no-repeat 0px 0px;background-repeat: no-repeat;background-size: 100% 100%;-moz-background-size: 100% 100%;}body {display: flex;align-items: center;justify-content: center;height: 100%;}#loginDiv {width: 37%;display: flex;justify-content: center;align-items: center;height: 300px;background-color: rgba(75, 81, 95, 0.3);box-shadow: 7px 7px 17px rgba(52, 56, 66, 0.5);border-radius: 5px;}#name_trip {margin-left: 50px;color: red;}p {margin-top: 30px;margin-left: 20px;color: azure;}input {margin-left: 15px;border-radius: 5px;border-style: hidden;height: 30px;width: 140px;background-color: rgba(216, 191, 216, 0.5);outline: none;color: #f0edf3;padding-left: 10px;}.button {border-color: cornsilk;background-color: rgba(100, 149, 237, .7);color: aliceblue;border-style: hidden;border-radius: 5px;width: 100px;height: 31px;font-size: 16px;}</style></head><body><div id="loginDiv"><form action="" id="form"><h1 style="text-align: center;color: aliceblue;">LOGIN IN</h1><p>User Name:<input id="userNname" type="text"><label id="name_trip"></label></p><p>Password: <input id="password" type="password"><label id="password_trip"></label></p> <div style="text-align: center;margin-top: 30px;"><input type="submit" class="button" value="login up"><input type="reset" class="button" value="reset"></div></form></div></body></html>register.html1<!DOCTYPE html>2<html lang="en">34<head>5<meta charset="UTF-8">6<title>register</title>7<style>8 * {9 margin: 0;10 padding: 0;11 }1213 html {14 height: 100%;15 width: 100%;16 overflow: hidden;17 margin: 0;18 padding: 0;19 background: url(Desert.jpg) no-repeat 0px 0px;20 background-repeat: no-repeat;21 background-size: 100% 100%;22 -moz-background-size: 100% 100%;23 }2425 body {26 display: flex;27 align-items: center;28 justify-content: center;29 height: 100%;30 }3132 #loginDiv {33 width: 37%;34 display: flex;35 justify-content: center;36 align-items: center;37 height: 650px;38 background-color: rgba(75, 81, 95, 0.3);39 box-shadow: 7px 7px 17px rgba(52, 56, 66, 0.5);40 border-radius: 5px;41 }4243 #name_trip {44 margin-left: 50px;45 color: red;46 }4748 p,49 .sexDiv {50 margin-top: 10px;51 margin-left: 20px;52 color: azure;53 }5455 .sexDiv>input,56 .hobby>input {57 width: 30px;58 height: 17px;59 }6061 input,62 select {63 margin-left: 15px;64 border-radius: 5px;65 border-style: hidden;66 height: 30px;67 width: 140px;68 background-color: rgba(216, 191, 216, 0.5);69 outline: none;70 color: #f0edf3;71 padding-left: 10px;72 }7374 .button {75 border-color: cornsilk;76 background-color: rgba(100, 149, 237, .7);77 color: aliceblue;78 border-style: hidden;79 border-radius: 5px;80 width: 100px;81 height: 31px;82 font-size: 16px;83 }8485 .introduce {86 margin-left: 110px;87 }8889 .introduce>textarea {90 background-color: rgba(216, 191, 216, 0.5);91 border-style: hidden;92 outline: none;93 border-radius: 5px;94 }9596 h1 {97 text-align: center;98 margin-bottom: 20px;99 margin-top: 20px;100 color: #f0edf3;101 }102103 b {104 margin-left: 50px;105 color: #FFEB3B;106 font-size: 10px;107 font-weight: initial;108 }109</style>110</head>111112<body>113<div id="loginDiv">114<form action="">115<h1>REGESTER</h1>116<p>⽤户姓名:<input id="userNname" type="text" autofocus required><label id="name_trip"></label></p>117118<p>⽤户密码:<input id="password" type="password" required><label id="password_trip"></label></p>119120<p>确认密码:<input id="surePassword" type="password" required><label id="surePassword_trip"></label></p> 121122<p>123⽤户类型:124<select name="type" id="userType">125<option value="0">请选择</option>126<option value="1">普通类型</option>127<option value="2">VIP类型</option>128</select>129<label id="type_trip"></label>130</p>131132<div class="sexDiv">133⽤户性别:134<input class="userSex" name="sex" value="boy" type="radio">男135<input class="userSex" name="sex" value="girl" type="radio">⼥136<label id="sex_trip"></label>137</div>138139<p>140出⽣⽇期:141<input id="birthday" type="date">142<label id="birthday_trip"></label>143</p>144145<p class="hobby">146兴趣爱好:147<input type="checkbox" name="hobby" value="read">阅读148<input type="checkbox" name="hobby" value="music">⾳乐149<input type="checkbox" name="hobby" value="sport">运动150<label id="hobby_trip"></label>151</p>152153<p>154电⼦邮件:155<input id="email" type="email" required>156<label id="emil_trip"></label>157</p>158159160<p>⾃我介绍:</p>161<div class="introduce">162<textarea name="introduce" cols="30" id="introduceText" required rows="10"></textarea>163<label id="introduce_trip"></label>164</div>165166<p style="text-align: center;">167<input type="submit" class="button" onblur="checkForm()" onclick="return submitT()" value="提交">168<input type="reset" class="button" value="重置">169</p>170</form>171</div>172173</body>174<script type="text/javascript">175function trip(obj, trip) {176 document.getElementById(obj).innerHTML = "<b>" + trip + "</b>"; 177 }178179function checkSex() {180 var sexNum = document.getElementsByName("sex");181 var sex = "";182 for (let i = 0; i < sexNum.length; ++i) {183 if (sexNum[i].checked) {184 sex = sexNum[i];185 }186187 }188 if (sex == "") {189 trip("sex_trip", "ERROR!!");190 return false;191 } else {192 trip("sex_trip", "OK!!");193 }194}195196function checkHobby() {197var hobbyNum = document.getElementsByName("hobby");198var hobby = "";199for (let i = 0; i < hobbyNum.length; ++i) {200if (hobbyNum[i].checked) {201 hobby = hobbyNum[i];202 }203 }204if (hobby == "") {205 trip("hobby_trip", "ERROR!!");206return false;207 } else {208 trip("hobby_trip", "OK!!");209210 }211 }212213function checkSelect() {214var myselect = document.getElementById("userType");215var index = myselect.selectedIndex;216var checkValue = myselect.options[index].value;217if (checkValue == 0) {218 trip("type_trip", "请选择!!");219return false;220 } else {221 trip("type_trip", "OK!!");222 }223 }224225function checkForm() {226 checkSelect();227 checkHobby();228 checkSex();229230var trip = document.getElementsByName("em");231var tripV = trip.innerHTML();232//获取⽤户名输⼊项233var userNname = document.getElementById("userNname");234var uName = userNname.value;235if (uName.length < 1 || uName.length > 10) {236 trip("name_trip", "账号长度为1-10位!!");237return false;238 } else {239 trip("name_trip", "OK!!");240241 }242243//密码长度⼤于6 和确认必须⼀致244var password = document.getElementById("password");245var userPass = password.value;246if (userPass.length < 6) {247 trip("password_trip", "密码要>6位!!");248return false;249 } else {250 trip("password_trip", "OK!!");251 }252253//获取确认密码框的值 var254var surePassword = document.getElementById("surePassword");255var surePass = surePassword.value;256if (userPass != surePass) {257 trip("surePassword_trip", "两次密码不⼀致!!");258return false;259 }260261//校验邮箱:/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/262var inputEmail = document.getElementById("email");263var uEmail = inputEmail.value;264if (!/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(uEmail)) { 265 trip("emil_trip", "邮箱不合法!!");266return false;267 } else {268 trip("emil_trip", "OK!!");269 }270271// 校验⾃我介绍272var introduceText = document.getElementById("introduceText");273var introduce = introduceText.value;274if (introduce.length < 3 || uName.length > 60) {275 trip("introduce_trip", "长度为3-50字!!");276return false;277 } else {278 trip("introduce_trip", "OK!!");279 }280281return true;282 }283284function submitT() {285if (checkForm()) {286return true;287 } else {288return false;289 }290 }291</script>293</html>。

html—登录及注册页面设计

html—登录及注册页面设计

html—登录及注册页⾯设计⼀、⽂字处理1、⽂字加粗:<strong><\strong>2、⽂字换⾏:<br/>3、⽂档标题:title4、整体⽂字居中<body align="center">5、整体字体颜⾊:<body style="color:white">6、段落:<p>7、标题:<h1>~<h6>⼆、超链接设置1、字体链接:<a href="链接地址">2、按钮链接:<input type="button" value="注册" onclick="window.open('链接地址')"3、弹出窗⼝设置:<input type="button" value="提交" onclick=alert("提交成功!")>备注:alert() ⽅法⽤于显⽰带有⼀条指定消息和⼀个 OK 按钮的警告框。

三、样式设置1、外框设置<body>---<DIV CLASS="bodered" >。

</DIV><HEAD>---.bodered{bodered-style:solid;width:300px;height:300px}2、图⽚⼤⼩设置:2.1 背景图⽚ <body background="链接地址">2.2 区域背景图⽚<BODY>----<div id="tp"><head>----#tp{width:200px;height:200px;background:url("链接地址")}四、表单设置:4.0 表单定义设置<form id="myform2" name="myform2" action="#" method="post">4.1 按钮 <input type="button" value="登录" style="width:300px;height=:200px">4.2 下拉菜单<SELECT id="place" name="place" style="width: 300px;height:30px"><option value="shuoshi">硕⼠及以上</option><option value="benke">本科</option><option value="dazhuang">⼤专</option><option value="gaozhong">⾼中及以下</option></select>4.3 下拉表单<select id="software" name="software" multiple="mulyiple" size="3" style="width:300px;height: 50px;"> <option value="OFFICE" id="of" name="of">OFFIC办公软件</option><option value="Corel Draw" id="cdr" name="cdr">Corel Draw</option><option value="AUTOCAD" id="cad" name="cad">AUTOCAD</option><OPYION value="spss" id="sp" name="sp">SPSS</OPYION><option value="matlab" id="mat" name="mat">MATLAB</option></select>4.4 多⾏⽂本<textarea row="50" cols="30" id="recommend" style="width:300px;height:50px;">此处输⼊⽂本</textarea>4.5 单选框<input type="radio" id=“male” name="xingbie" value="男" >男<input type="radio" id=“female” name="xingbie" value="⼥" >⼥单选框选之⼀:name需要⼀致!!4.6 复选框<input type="checkbox" name="aihao" id="aihao" value="唱歌"/>唱歌<input type="checkbox" name="lq" id="lq" value="篮球"/>篮球<input type="checkbox" name="ym" id="ym" value="⽻⽑球"/>⽻⽑球<input type="checkbox" name="yw" id="tw" value="跳舞"/>跳舞</DD>4.7 ⽂件上传 <input type="file" id="photo"/>4.8 表单容器盒⼦fieldset<fieldset><legend><h1 align="center" >登录页⾯</h1></legend></fieldset>五、代码:<!--登录--><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""/TR/html4/loose.dtd"><html><head><title>登录页⾯</title><style type="text/css">.bordered {border-style:solid;width:600px;height:300px;}#bg{width:600px;height:310px;background: url(678.png);}</style></head><body><body align="center"><body style="color:black"/><br/><br/><br/><br/> &nbsp;&nbsp;&nbsp;&nbsp;<div id="bg"><div class="bordered" ><fieldset><legend><h1 align="center" >登录页⾯</h1></legend><br/> <br/><form id="myform" name="myform" action="#" method="post"><p><strong >⽤户名</strong>&nbsp;<input type="text" id="yonghuming"/></p><br/><p ><STRONG>密&nbsp;码</STRONG>&nbsp;<input type="password" id="mima"/></p><br/><p><input type="button" value="登录" style="width:70px;height:30px" />&nbsp;&nbsp;<input type="button" value="注册" style="width:55px;height:30px" onclick="window.open('注册页⾯.HTML')"/></P></form></fieldset></div></div></body></html><!--注册--><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""/TR/html4/loose.dtd"><html><head><title>个⼈信息注册</title><style type="text/css">#tp{width:600px;height: 620px;background:url("12345.jpg")}</style></head><body><form id="myform2" name="myform2" action="#" method="post"><div id="tp"><body style="color:white"/><fieldset><legend><h1 align="center">个⼈信息注册</h1></legend><hr align="center"><dl><dt><dd><strong>⽤&nbsp;户&nbsp;名 </strong> <input type="text" id="yhm" name="yhm" style="width:300px; height: 30px;"/></dd><br/><dd><strong>请设置密码 </strong> <input type="password" id="mima" name="mima"style="width:300px; height: 30px;"/> </dd><br/><dd><strong>请确认密码 </strong><input type="password" id="rmima" name="rmima"style="width:300px; height: 30px;"/></dd><br/><dd><strong>性&nbsp;&nbsp;&nbsp;别 </strong><input type="radio" id="male" name="xingbie"/>男&nbsp;&nbsp; <input type="radio" id="female" name="xingbie"/>⼥</dd> <br/><dd><strong>学&nbsp;&nbsp;&nbsp;历</strong><SELECT id="place" name="place" style="width: 300px;height:30px"><option value="shuoshi">硕⼠及以上</option><option value="benke">本科</option><option value="dazhuang">⼤专</option><option value="gaozhong">⾼中及以下</option></select><br/><br/><DD><strong>精通软件</strong><select id="software" name="software" multiple="mulyiple" size="3" style="width:300px;height: 50px;"><option value="OFFICE" id="of" name="of">OFFIC办公软件</option><option value="Corel Draw" id="cdr" name="cdr">Corel Draw</option><option value="AUTOCAD" id="cad" name="cad">AUTOCAD</option><OPYION value="spss" id="sp" name="sp">SPSS</OPYION><option value="matlab" id="mat" name="mat">MATLAB</option></select></DD><br/><DD><strong>爱&nbsp;&nbsp;&nbsp;好 </strong><input type="checkbox" name="aihao" id="aihao" value="唱歌"/>唱歌<input type="checkbox" name="lq" id="lq" value="篮球"/>篮球<input type="checkbox" name="ym" id="ym" value="⽻⽑球"/>⽻⽑球<input type="checkbox" name="yw" id="tw" value="跳舞"/>跳舞</DD><br/><DD><strong>⾃我介绍 </strong><textarea row="50" cols="30" id="recommend" style="width:300px;height:50px;">此处输⼊⽂本</textarea></DD><br/><br/><dd><strong>请提供jpg或png格式照⽚</strong><input type="file" id="photo"/></dd></dt></dl><P><input type="button" value="提交" onclick=alert('提交成功,请重新登录!') style="width:70px;height:40px;" /></P></fieldset></div></form></body></html>。

简述h5的基本流程

简述h5的基本流程

简述h5的基本流程HTML5 (Hypertext Markup Language 5) is the latest version of the HTML standard that is used to create and structure content on the World Wide Web. H5是用于在世界范围内创建和组织内容的HTML标准的最新版本。

It is designed to improve the language with support for the latest multimedia and interactive elements, as well as to keep up with the ever-evolving web technologies. 它旨在通过支持最新的多媒体和交互元素来改进该语言,以跟上不断发展的web技术。

The basic flow of creating a webpage using HTML5 involves several key steps that are essential for building a modern and responsive website. 使用HTML5创建网页的基本流程涉及几个关键步骤,这些步骤对于构建现代、响应式的网站至关重要。

In this process, web developers need to understand the structure of HTML5, incorporate various elements and attributes, and ensure compatibility with different browsers and devices. 在此过程中,web开发人员需要了解HTML5的结构,整合各种元素和属性,并确保与不同的浏览器和设备兼容。

Html分页实现

Html分页实现

Html分页实现还是围绕新项⽬来的,因为没有统⼀的分页控件,⼤家各写各的,浪费时间不说,长的⼜千奇百怪,所以就把这个⼩活收回来了,乱七⼋糟写了⼀通,还凑合能⽤。

主要逻辑就是根据当前页码、分页⼤⼩和记录总数计算前两页后两页,以及上、下页等对应的链接地址就可以了。

代码保存⼀下,以备后续完善。

因公司不能上传图⽚,所以⼤家只好来个亲⾃动⼿看⼀下效果了。

分页控件需要读取url中的“page”参数,在页⾯中分页的位置写下以下语句就可以了<%=******.Utility.Pager.Html(this.TotalCount, this.Page, 10) %>CS代码using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Web;namespace ******.Utility{/// <summary>/// 分页/// </summary>public class Pager{///<summary>///分页控件///</summary>///<param name="recordCount">记录总数</param>///<param name="pageIndex">分页索引</param>///<param name="pageSize">分页⼤⼩</param>/// <returns>返回分页的Html代码</returns>public static string Html(int recordCount, int pageIndex, int pageSize){string result = string.Empty;pageSize = pageSize < 1 ? 10 : pageSize;pageIndex = pageIndex < 1 ? 1 : pageIndex;recordCount = recordCount < 1 ? 1 : recordCount;if (recordCount > pageSize){int pageCount = (recordCount % pageSize) == 0 ? (recordCount / pageSize) : (recordCount / pageSize) + 1;string pageLink = PageLinkConstruct();if (pageIndex > pageCount){pageIndex = pageCount;}string htmlLeftPage = string.Empty;string htmlRightPage = string.Empty;//前两页for (int i = 2; i > 0; i--){if (pageIndex - i > 0){htmlLeftPage += string.Format("<a href=\"{0}\">{1}</a>", string.Format(pageLink, (pageIndex - i)), pageIndex - i);}}//后两页for (int j = 1; j < 3; j++){if (pageIndex + j <= pageCount){htmlRightPage += string.Format("<a href=\"{0}\">{1}</a>", string.Format(pageLink, (pageIndex + j)), pageIndex + j);}}int prevPage = pageIndex - 1;if (prevPage < 1){prevPage = 1;}int nextPage = pageIndex + 1;if (nextPage > pageCount){nextPage = pageCount;}string leftHtml = string.Empty;if (pageIndex > 1){leftHtml = string.Format("<a {0}>{1}</a><a {2}>{3}</a>{4}", string.Format("href=\"{0}\"", string.Format(pageLink, 1)), "⾸页", string.Format("href=\"{0}\"", string.Format(pageLink, prevPage)), "上⼀页", htmlLeftPage);}string rightHtml = string.Empty;if (pageIndex < pageCount){rightHtml = string.Format("{0}<a {1}>{2}</a><a {3}>{4}</a>", htmlRightPage, string.Format("href=\"{0}\"",string.Format(pageLink, nextPage)), "下⼀页", string.Format("href=\"{0}\"", string.Format(pageLink, pageCount)), "尾页");}result = string.Format("<div class=\"htmlpager\">{0}<b>{1}</b>{2}</div>", leftHtml, pageIndex, rightHtml);}return result;}/// <summary>/// 构造翻页Url/// </summary>/// <returns></returns>private static string PageLinkConstruct(){HttpContext hc = HttpContext.Current;StringBuilder sb = new StringBuilder();if (!string.IsNullOrEmpty(hc.Request.QueryString["page"])){for (int i = 0; i < hc.Request.QueryString.Count; i++){if (hc.Request.QueryString.Keys[i] != "page"){sb.AppendFormat("{0}={1}", hc.Request.QueryString.Keys[i], hc.Request.QueryString[i].ToString());sb.Append("&");}else{sb.Append("page={0}&");}}}else{for (int i = 0; i < hc.Request.QueryString.Count; i++){sb.AppendFormat("{0}={1}", hc.Request.QueryString.Keys[i], hc.Request.QueryString[i].ToString());sb.Append("&");}sb.Append("page={0}&");}if (sb.Length > 0){sb.Remove(sb.Length - 1, 1);}var url = new UriBuilder();url.Scheme = hc.Request.Url.Scheme;url.Host = hc.Request.Url.Host;url.Port = hc.Request.Url.Port;url.Path = hc.Request.Url.AbsolutePath;url.Query = sb.ToString();return url.ToString();}}}CSSDIV.htmlpager { MARGIN-TOP: 20px; MARGIN-BOTTOM: 10px}DIV.htmlpager A {BORDER-RIGHT: #8db5d7 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #8db5d7 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #8db5d7 1px solid; COLOR: #000; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #8db5d7 1px solid; TEXT-DECORATION: none}DIV.htmlpager A:hover {BORDER-RIGHT: red 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: red 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: red 1px solid; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: red 1px solid}DIV.htmlpager A:active {BORDER-RIGHT: red 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: red 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: red 1px solid; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: red 1px solid}DIV.htmlpager b {BORDER-RIGHT: #e89954 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #e89954 1px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; BORDER-LEFT: #e89954 1px solid; COLOR: #000; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #e89954 1px solid; BACKGROUND-COLOR: #ffca7d}。

使用HTML和CSS创建精美的用户界面

使用HTML和CSS创建精美的用户界面

使用HTML和CSS创建精美的用户界面随着互联网的发展和技术的进步,用户界面的设计越来越受到重视。

一个好的用户界面可以提升用户的体验,增加用户的黏性,并且提高产品的竞争力。

在今天的文章中,我们将讨论如何使用HTML和CSS创建精美的用户界面。

首先,让我们来了解一下HTML和CSS的基本概念。

HTML(Hypertext Markup Language)是一种用来描述网页结构的标记语言,它可以定义网页中的各种元素,包括文本、图像、链接等等。

CSS(Cascading Style Sheets)是一种用来定义网页样式的语言,它可以控制网页中各个元素的大小、颜色、布局等等。

在创建用户界面之前,我们需要先进行页面的分析和规划。

我们可以用纸和笔来绘制页面的草图,明确需要展示的元素和它们的排列方式。

这有助于我们有一个清晰的思路,并且避免在代码中频繁修改布局。

接下来我们可以开始编写HTML代码了。

在HTML中,我们可以使用各种标签来定义不同的元素。

例如,可以使用<h1>标签来定义一个一级标题,<p>标签来定义一个段落,<img>标签来插入一张图片等等。

通过合理组织这些标签,我们可以构建出一个结构清晰、内容丰富的网页。

然后,我们需要使用CSS来对页面的样式进行设计。

CSS提供了丰富的样式属性和选择器,可以让我们轻松地改变页面的外观。

例如,我们可以使用background-color属性来改变页面的背景颜色,font-size属性来改变文字的大小,margin和padding属性来调整元素之间的间距等等。

通过合理地运用这些属性,我们可以创造出各种各样的页面效果。

除了基本的HTML和CSS,我们还可以使用一些辅助工具来提升用户界面的质量。

例如,我们可以使用响应式设计来使页面在不同设备上的屏幕尺寸上都有良好的展示效果。

我们可以使用javascript来添加一些交互效果,提升用户的体验。

login_content.html页面实现过程

login_content.html页面实现过程

login_content.html页面实现过程目标效果:功能描述:实现过程:一、在利用模板创建一个登陆页面(选默认模板即可)二、在login_content.html中删除和调整与目标需求不一致的UI布局,使之布局一致。

三、分别给“用户名、密码、立即注册、登陆”指定一个id号用户名:<input placeholder="手机/邮箱/用户名" type="text" class="ub-f1" id="uid"> 密码:<input placeholder="密码" type="password" class="umw4 ub-f1" id="upwd"> 注册:<div class="ub ub-pe uinn-a6 sc-text-active ulev-4" id="register">立即注册</div>登陆:<div class="uinn-at1" id="login"><div class="btn ub ub-ac bc-text-head ub-pc bc-btn uc-a" >登录</div></div>四、定义login函数,并在button中执行该函数<script>var m_id='';appcan.ready(function() {});appcan.button("#login", "ani-act", function() {login();})function login() {var myIP = "/base/loginCallback";var name=$("#uid").val();var pwd=$("#upwd").val();loadData(name);if (!isDefine(name)) {appcan.window.openToast("请输入用户名!", '2000', '5', 0);return;}if (!isDefine(pwd)) {appcan.window.openToast("请输入密码!", '2000', '5', 0);return;}appcan.request.ajax({url : myIP + "?loginName="+ name + "&loginPassword="+ pwd + "&callback=?",type : 'get',dataType : 'json',success : function(data, status, xhr) {if (data.status == "0") {//如果是从会员中心打开的登录if (appcan.locStorage.val('vip') == 'vip') { appcan.window.open({name : 'vip',data : 'vip.html'});appcan.locStorage.setVal('islog', 1);appcan.window.publish('c_status',$("#uid").val());}//如果是从抢座页面打开的登录if (appcan.locStorage.val('qiangzuo') == 'qiangzuo') {//点击抢座的时候如果未登录,跳转到登录页面appcan.window.open({name : 'qiangzuo',data : 'qiangzuo.html'});appcan.locStorage.setVal('islog', 1);m_id=appcan.locStorage.val('memberId');appcan.locStorage.setVal('login_memberID',m_id);appcan.locStorage.setVal('yemian','login');// appcan.locStorage.setVal('id');}}else{appcan.window.openToast('用户名或密码有误!','2000',5,0);}},error : function(xhr, status, errMessage) {appcan.window.openToast('登录失败!','2000',5,0);}});}//注册appcan.button('#register', 'ani-act', function() {appcan.window.open({name : 'register',data : 'register.html',aniId : '10'})});function loadData(name) {m_ip = "/base/getMemberIdCallback";//根据登录的session值获取memberIDvar yuyue_ip ="/PcenterApi/selectReserve?code=0";appcan.request.ajax({url : m_ip + '?subsites=0&username='+ name + '&callback=?', type : 'get',dataType : 'json',success : function(data) {if (data.status == '0') {var memberId = data.member_id;appcan.locStorage.setVal('memberId',memberId);}},error : function(xhr, status, errMessage) {alert("error");}})};</script>四、定义my.js文件放入js文件夹,并进行引用对my.js的定义进行讲解。

Html制作简单而漂亮的登录页面

Html制作简单而漂亮的登录页面

这篇文章主要为大家详细介绍了Html制作简单而漂亮的登录页面具体代码,具有一定的参考价值,感兴趣的小伙伴们可以参考一下html源码:XML/HTML Code&lt;!DOCTYPE html&gt; &nbsp;&lt;html lang="en"&gt; &nbsp;&lt;head&gt; &nbsp;&nbsp; &nbsp; &lt;meta charset="UTF-8"&gt; &nbsp;&nbsp; &nbsp; &lt;title&gt;Login&lt;/title&gt; &nbsp;&nbsp; &nbsp; &lt;link rel="stylesheet" type="text/css" href="Login.css"/&gt; &nbsp;&lt;/head&gt; &nbsp;&lt;body&gt; &nbsp;&nbsp; &nbsp; &lt;div id="login"&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;h1&gt;Login&lt;/h1&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;form method="post"&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type="text" required="required" placeholder="用户名" name="u"&gt;&lt;/input&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type="password" required="required" placeholder="密码" name="p"&gt;&lt;/input&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;button class="but" type="submit"&gt;登录&lt;/button&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;/form&gt; &nbsp;&nbsp; &nbsp; &lt;/div&gt; &nbsp;&lt;/body&gt; &nbsp;&lt;/html&gt; &nbsp;css代码:CSS Codehtml{ &nbsp;&nbsp;&nbsp; &nbsp; width: 100%; &nbsp;&nbsp;&nbsp; &nbsp; height: 100%; &nbsp;&nbsp;&nbsp; &nbsp; overflow: hidden; &nbsp;&nbsp;&nbsp; &nbsp; font-style: sans-serif; &nbsp;&nbsp;} &nbsp;&nbsp;body{ &nbsp;&nbsp;&nbsp; &nbsp; width: 100%; &nbsp;&nbsp;&nbsp; &nbsp; height: 100%; &nbsp;&nbsp;&nbsp; &nbsp; font-family: 'Open Sans',sans-serif; &nbsp;&nbsp;&nbsp; &nbsp; margin: 0; &nbsp;&nbsp;&nbsp; &nbsp; background-color: #4A374A; &nbsp;&nbsp;} &nbsp;&nbsp;#login{ &nbsp;&nbsp;&nbsp; &nbsp; position: absolute; &nbsp;&nbsp;&nbsp; &nbsp; top: 50%; &nbsp;&nbsp;&nbsp; &nbsp; left:50%; &nbsp;&nbsp;&nbsp; &nbsp; margin: -150px 0 0 -150px; &nbsp;&nbsp;&nbsp; &nbsp; width: 300px; &nbsp;&nbsp;&nbsp; &nbsp; height: 300px; &nbsp;&nbsp;} &nbsp;&nbsp;#login h1{ &nbsp;&nbsp;&nbsp; &nbsp; color: #fff; &nbsp;&nbsp;&nbsp; &nbsp; text-shadow:0 0 10px; &nbsp;&nbsp;&nbsp; &nbsp; letter-spacing: 1px; &nbsp;&nbsp;&nbsp; &nbsp; text-align: center; &nbsp;&nbsp;} &nbsp;&nbsp;h1{ &nbsp;&nbsp;&nbsp; &nbsp; font-size: 2em; &nbsp;&nbsp;&nbsp; &nbsp; margin: 0.67em 0; &nbsp;&nbsp;} &nbsp;&nbsp;input{ &nbsp;&nbsp;&nbsp; &nbsp; width: 278px; &nbsp;&nbsp;&nbsp; &nbsp; height: 18px; &nbsp;&nbsp;&nbsp; &nbsp; margin-bottom: 10px; &nbsp;&nbsp;&nbsp; &nbsp; outline: none; &nbsp;&nbsp;&nbsp; &nbsp; padding: 10px; &nbsp;&nbsp;&nbsp; &nbsp; font-size: 13px; &nbsp;&nbsp;&nbsp; &nbsp; color: #fff; &nbsp;&nbsp;&nbsp; &nbsp; text-shadow:1px 1px 1px; &nbsp;&nbsp;&nbsp; &nbsp; border-top: 1px solid #312E3D; &nbsp;&nbsp;&nbsp; &nbsp; border-left: 1px solid #312E3D; &nbsp;&nbsp;&nbsp; &nbsp; border-right: 1px solid #312E3D; &nbsp;&nbsp; &nbsp; &nbsp; border-bottom: 1px solid #56536A; &nbsp;&nbsp; &nbsp; &nbsp; border-radius: 4px; &nbsp;&nbsp;&nbsp; &nbsp; background-color: #2D2D3F; &nbsp;&nbsp;} &nbsp;&nbsp;.but{ &nbsp;&nbsp;&nbsp; &nbsp; width: 300px; &nbsp;&nbsp;&nbsp; &nbsp; min-height: 20px; &nbsp;&nbsp;&nbsp; &nbsp; display: block; &nbsp;&nbsp;&nbsp; &nbsp; background-color: #4a77d4; &nbsp;&nbsp;&nbsp; &nbsp; border: 1px solid #3762bc; &nbsp;&nbsp;&nbsp; &nbsp; color: #fff; &nbsp;&nbsp;&nbsp; &nbsp; padding: 9px 14px; &nbsp;&nbsp;&nbsp; &nbsp; font-size: 15px; &nbsp;&nbsp;&nbsp; &nbsp; line-height: normal; &nbsp;&nbsp;&nbsp; &nbsp; border-radius: 5px; &nbsp;&nbsp;&nbsp; &nbsp; margin: 0; &nbsp;&nbsp;} &nbsp;总结:代码如下:&lt;input type="text" required="required" **placeholder="用户名"** name="u"&gt;&lt;/input&gt;&nbsp;&lt;input type="password" required="required" **placeholder="密码"** name="p"&gt;&lt;/input&gt;placeholder="用户名"的作用:占位符以上就是本文的全部内容,希望对大家的学习有所帮助。

ActionScript编程 综合实例:制作会员注册页界面

ActionScript编程  综合实例:制作会员注册页界面

ActionScript编程综合实例:制作会员注册页界面在很多会员制的网站中,会员注册页面是必不可少的,用户通过该页面可以将自己的相关信息(如用户名、密码、联系方式等)提交给网站数据库中,以实现相应的操作。

在Flash网站中,同样可以实现该功能,而且通过组件制作的界面也更加美观。

会员注册页界面如图20-1所示。

图20-1 会员注册页界面制作过程:(1)新建500×480像素的空白文档,设置【背景颜色】为“浅黄色”(#FCF6E8)。

然后,在舞台的顶部绘制一个深黄色的圆角矩形,如图20-2所示。

图20-2 绘制圆角矩形(2)在该圆角矩形的左侧绘制图标及输入标题文字,然后在其右侧输入英文字母,如图20-3所示。

图20-3 制作标题栏(3)在标题栏的下面绘制一个较大的圆角矩形,该矩形的【笔触颜色】为“深黄色”(#E5DDBF);【填充颜色】为“浅黄色”(#F6F3DF),如图20-4所示。

图20-4 绘制圆角矩形(4)打开【组件】面板,将Button、CheckBox、ComboBox、Label和TileList等组件拖入到【库】面板中,以便通过ActionScript 代码调用,如图20-5所示。

图20-5 拖入相应组件(5)在相同文件夹中新建名称为form的ActionScript文件,并在该文件中使用import语句导入所需的类,以及创建包、form 类和form()主函数,如下所示。

package{import flash.display.Sprite;import bel;import flash.text.TextFormat;importflash.text.TextFieldAutoSize;import fl.controls.TextInput;import fl.controls.TileList;importfl.controls.ScrollBarDirection;import fl.controls.RadioButton;importfl.controls.NumericStepper;import boBox;import fl.controls.CheckBox;import fl.controls.TextArea;import fl.controls.Button;import fl.controls.List;public class form extends Sprite{public function form(){//主函数体}}}(6)在form类中创建名称为createLabel的函数,该函数创建一个Label组件实例,并可根据传递的参数定义其显示的文本内容、位置及文本大小,如下所示。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

vip.html页面实现过程
目标效果:
功能描述:在vip.html页面中只能实现头部栏和底部栏,中间的弹性区域需要在centent页面中实现。

实现过程:
头部栏
一、头部栏标题修改
将头部栏标题改成“会员中心”
二、修改头部栏右图标改成登陆按钮图标,并定义一个id,代码如下:
<div class="nav-btn nav-bt" id="nav-right">
<div class="ub-img icon-adduser umw2 umh4"></div>
</div>
改成
<div class="nav-btn nav-bt" id="login">
<div class="fa fa-user ulev2"></div>
</div>
三、登陆按钮的页面跳转(跳转到登陆页面)
appcan.button("#login", "btn-act", function() {
appcan.window.open({
name : 'login',
data : 'login.html'
});
appcan.locStorage.setVal('vip', 'vip');
})
底部栏
一、底部栏UI设计
该页面的底部栏UI设计实现过程与主页一致。

可以从主页的底部栏直接复制。

注意不要忘记引用my.css文件:<link rel="stylesheet" href="css/my.css">二、底部导航跳转页面链接(分别跳转至“主页”和“更多”页面)
//底部导航
appcan.button("#v_more", 'btn-act', function() {
appcan.window.open({
name : 'more',
data : 'more.html',
aniId : '10'
})
})
appcan.button("#v_index", 'btn-act', function() {
appcan.window.open({
name : 'index',
data : 'index.html',
aniId : '10'
})
})。

相关文档
最新文档