1、网页设计老师安排作业了,题目是:请在Dreamweaver中创建一个用户注册页面表单或其他表单,要求至少要有:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>注册</title>
<style type="text/css">
<!--
body{margin:a auto;padding:0; text-align:center;font-size:12px;}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_popupMsg(msg) { //v1.0
alert(msg);
}
//-->
</script>
</head>
<body>
<table width="500" border="0" cellspacing="1" cellpadding="0">
<form action="" method="post" enctype="multipart/form-data" name="form">
<tr>
<td width="98" height="30" align="right" valign="middle" bgcolor="#E8E8E8">账号:</td>
<td width="402" align="left" bgcolor="#E8E8E8"><input type="text" name="textfield" /></td>
</tr>
<tr>
<td height="30" align="right" valign="middle" bgcolor="#E8E8E8">密码:</td>
<td align="left" bgcolor="#E8E8E8"><input type="password" name="textfield2" /></td>
</tr>
<tr>
<td height="30" align="right" valign="middle" bgcolor="#E8E8E8">重复密码:</td>
<td align="left" bgcolor="#E8E8E8"><input type="password" name="textfield22" /></td>
</tr>
<tr>
<td height="30" align="right" valign="middle" bgcolor="#E8E8E8">爱好:</td>
<td align="left" bgcolor="#E8E8E8"><input type="checkbox" name="checkbox" value="checkbox" />
游泳
<input type="checkbox" name="checkbox2" value="checkbox" />
看书
<input type="checkbox" name="checkbox3" value="checkbox" />
画画
<input type="checkbox" name="checkbox4" value="checkbox" />
游戏
<input type="checkbox" name="checkbox5" value="checkbox" />
看电影</td>
</tr>
<tr>
<td height="100" align="right" valign="middle" bgcolor="#E8E8E8">简介:</td>
<td align="left" bgcolor="#E8E8E8"><label>
<textarea name="textarea" cols="50" rows="6"></textarea>
</label></td>
</tr>
<tr>
<td height="30" align="right" valign="middle" bgcolor="#E8E8E8"> </td>
<td align="left" bgcolor="#E8E8E8"><input name="Submit" type="submit" onclick="MM_popupMsg('欢迎注册')" value="提交" />
<input type="reset" name="Submit2" value="重置" /></td>
</tr>
</form>
</table>
</body>
</html>
2、html网页设计:一个简单的登录界面代码!
是这样的效果吗?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>3</title>
<script>
function r()
{
var username=document.getElementById("username");
var pass=document.getElementById("password");
if(username.value=="")
{
alert("请输入用户名");
username.focus();
return;
}
if(pass.value=="")
{
alert("请输入密码");
return;
}
return true;
}
</script>
</head>
<body>
<form>
<table width="350" bgcolor="#ccffcc" style="border-color" border="1">
<tr align=center>
<td>用户名</td><td><input type="text" name="username" id="username"></td>
</tr>
<tr align=center><td>密 码</td><td><input type="password" name="password" id="password"></td></tr>
<tr align=center><td>验证码</td><td><input type="text" name="yanzheng"></td></tr>
<tr align=center><td colspan="2"><input type="button" value="登 录" onclick="r();"/> <input type="reset" value="重 置"/></td></tr>
</table>
</form>
</body>
</html>
3、HTML网页设计:一个简单的登录界面可以连接到数据库记录的代码
如下参考:
1.首先,在您的计算机桌面上创建一个新文件夹,然后在该文件夹中创建一个新的文本文档。
2.然后用记事本双击打开文本文档,如下图所示,然后编写一个简单的HTML代码。
3.点击“另存为”功能选项,显示默认的“另存为”代码为ANSI。
4.我们将把编码和文件名更改回图中所示的图像并保存它。
5.然后回到新创建的文件夹,找到一个额外的HTML文件。
6.最后,使用浏览器打开HTML文件。结果如图所示。
4、在网页设计中的用户注册中,出生年月日是怎么做的?急!急!!!!
用这个js:
<script language="JavaScript">
var gdCtrl = new Object();
var SynCtl = new Object();
var goSelectTag = new Array();
var overcolor="#FF6600";
var gcGray = "#999999";
var gcToggle = "#FFFF99";
var gcBG = "#FFFFF4";
var titleBG="#3399CC";
var previousObject = null;
var oPopup = window.createPopup();
var gdCurDate = new Date();
var giYear = gdCurDate.getFullYear();
var giMonth = gdCurDate.getMonth()+1;
var giDay = gdCurDate.getDate();
function shutup(){
oPopup.hide();
}
function fSetDate(iYear, iMonth, iDay){
VicPopCal.style.visibility = "hidden";
if ((iYear == 0) && (iMonth == 0) && (iDay == 0)){
gdCtrl.value = "";
}else{
iMonth = iMonth + 100 + "";
iMonth = iMonth.substring(1);
iDay = iDay + 100 + "";
iDay = iDay.substring(1);
if(gdCtrl.tagName == "INPUT"){
gdCtrl.value = iYear+"-"+iMonth+"-"+iDay;
if(SynCtl!=null)
SynCtl.value = iYear+"-"+iMonth+"-"+iDay;
}else{
gdCtrl.innerText = iYear+"-"+iMonth+"-"+iDay;
if(SynCtl!=null)
SynCtl.innerText = iYear+"-"+iMonth+"-"+iDay;
}
}
}
function fSetSelected(aCell){
var iOffset = 0;
var iYear = parseInt(tbSelYear.value);
var iMonth = parseInt(tbSelMonth.value);
aCell.bgColor = gcBG;
with (aCell.children["cellText"]){
var iDay = parseInt(innerText);
if (color==gcGray)
iOffset = (Victor<10)?-1:1;
iMonth += iOffset;
if (iMonth<1) {
iYear--;
iMonth = 12;
}else if (iMonth>12){
iYear++;
iMonth = 1;
}
}
fSetDate(iYear, iMonth, iDay);
shutup();
}
function Point(iX, iY){
this.x = iX;
this.y = iY;
}
function fBuildCal(iYear, iMonth) {
var aMonth=new Array();
for(i=1;i<7;i++)
aMonth[i]=new Array(i);
var dCalDate=new Date(iYear, iMonth-1, 1);
var iDayOfFirst=dCalDate.getDay();
var iDaysInMonth=new Date(iYear, iMonth, 0).getDate();
var iOffsetLast=new Date(iYear, iMonth-1, 0).getDate()-iDayOfFirst+1;
var iDate = 1;
var iNext = 1;
for (d = 0; d < 7; d++)
aMonth[1][d] = (d<iDayOfFirst)?-(iOffsetLast+d):iDate++;
for (w = 2; w < 7; w++)
for (d = 0; d < 7; d++)
aMonth[w][d] = (iDate<=iDaysInMonth)?iDate++:-(iNext++);
return aMonth;
}
function fDrawCal(iYear, iMonth, iCellHeight, sDateTextSize) {
var WeekDay = new Array("日","一","二","三","四","五","六");
var styleTD = " bgcolor='"+titleBG+"' valign='middle' align='center' height='"+iCellHeight+"' style='font:bold "+sDateTextSize+";"; //Coded by Liming Weng(Victor Won) email:[email protected]
var styleTDBG = " bgcolor='"+gcBG+"' valign='middle' align='center' height='"+iCellHeight+"' style='font:"+sDateTextSize+";";
with (document) {
write("<tr>");
for(i=0; i<7; i++){
write("<td "+styleTD+"color:#ffffff' >"+ WeekDay[i] + "</td>");
}
write("</tr>");
for (w = 1; w < 7; w++) {
write("<tr>");
for (d = 0; d < 7; d++) {
write("<td id=calCell "+styleTDBG+"cursor:hand;' onMouseOver='this.bgColor=parent.gcToggle' onMouseOut='this.bgColor=parent.gcBG' onclick='parent.fSetSelected(this)'>");
write("<font id=cellText Victor='Liming Weng'> </font>");
write("</td>")
}
write("</tr>");
}
}
}
function fUpdateCal(iYear, iMonth) {
tbSelMonth.options[iMonth-1].selected = true;
for (i = 0; i < tbSelYear.length; i++)
if (tbSelYear.options[i].value == iYear){
tbSelYear.options[i].selected = true;
}
myMonth = fBuildCal(iYear, iMonth);
var i = 0;
for (w = 0; w < 6; w++)
for (d = 0; d < 7; d++)
with (cellText[(7*w)+d]) {
Victor = i++;
if (myMonth[w+1][d]<0) {
color = gcGray;
innerText = -myMonth[w+1][d];
}else{
color = ((d==0)||(d==6))?"#FF3300":"#009900";
innerText = myMonth[w+1][d];
}
}
updatePopup(VicPopCal.innerHTML);
}
function fSetYearMon(iYear, iMon){
tbSelMonth.options[iMon-1].selected = true;
for (i = 0; i < tbSelYear.length; i++)
if (tbSelYear.options[i].value == iYear){
tbSelYear.options[i].selected = true;
}
fUpdateCal(iYear, iMon);
}
function fGetXY(aTag){
var oTmp = aTag;
var pt = new Point(0,0);
do {
pt.x += oTmp.offsetLeft;
pt.y += oTmp.offsetTop;
oTmp = oTmp.offsetParent;
} while(oTmp.tagName!="BODY");
return pt;
}
// Main: popCtrl is the widget beyond which you want this calendar to appear;
// dateCtrl is the widget into which you want to put the selected date.
// i.e.: <input type="text" name="dc" style="text-align:center" readonly><INPUT type="button" value="V" onclick="fPopCalendar(dc,dc);return false">
function fPopCalendar(popCtrl, dateCtrl,strDate){
previousObject = popCtrl;
gdCtrl = dateCtrl;
SynCtl = strDate;
fInitialDate(strDate);
fSetYearMon(giYear, giMonth);
var point = fGetXY(popCtrl);
with (VicPopCal.style) {
left = point.x;
top = point.y+popCtrl.offsetHeight;
//width = VicPopCal.offsetWidth;
width = 206; // Added by Danian Zhang/SUI
height = VicPopCal.offsetHeight;
// visibility = 'visible';
}
updatePopup(VicPopCal.innerHTML);
var popLeft=parseInt(VicPopCal.style.left);
var popTop=parseInt(VicPopCal.style.top);
var popWidth=parseInt(VicPopCal.style.width);
var popHeight=parseInt(VicPopCal.style.height);
oPopup.show(popLeft,popTop,popWidth,popHeight,document.body);
}
function fPopSimulateCalendar(popCtrlID, dateCtrlID,strDate){
var itemID;
var popCtrl,dateCtrl;
with (document.all.tags("INPUT")){
for (i=0;i<length;i++){
if(item(i).type=="text"){
itemID=item(i).id;
if(itemID.indexOf(popCtrlID)>-1){
popCtrl=item(i);
dateCtrl=item(i);
break;
}
}
}
}
previousObject = popCtrl;
gdCtrl = dateCtrl;
SynCtl = strDate;
fInitialDate(strDate);
fSetYearMon(giYear, giMonth);
var point = fGetXY(popCtrl);
with (VicPopCal.style) {
left = point.x;
top = point.y+popCtrl.offsetHeight;
//width = VicPopCal.offsetWidth;
width = 206; // Added by Danian Zhang/SUI
height = VicPopCal.offsetHeight;
// visibility = 'visible';
}
updatePopup(VicPopCal.innerHTML);
var popLeft=parseInt(VicPopCal.style.left);
var popTop=parseInt(VicPopCal.style.top);
var popWidth=parseInt(VicPopCal.style.width);
var popHeight=parseInt(VicPopCal.style.height);
oPopup.show(popLeft,popTop,popWidth,popHeight,document.body);
}
function updatePopup(innerString){
var oPopupBody = oPopup.document.body;
oPopupBody.innerHTML =innerString;
}
// Added by Danian Zhang/SUI
function fInitialDate(strDate){
if( strDate == null || strDate.length != 10 )
return false;
var sYear = strDate.substring(0,4);
var sMonth = strDate.substring(5,7);
var sDay = strDate.substring(8,10);
if( sMonth.charAt(0) == '0' ) { sMonth = sMonth.substring(1,2); }
if( sDay.charAt(0) == '0' ) { sDay = sDay.substring(1,2); }
var nYear = parseInt(sYear );
var nMonth = parseInt(sMonth);
var nDay = parseInt(sDay );
if ( isNaN(nYear ) ) return false;
if ( isNaN(nMonth) ) return false;
if ( isNaN(nDay ) ) return false;
var arrMon = new Array(12);
arrMon[ 0] = 31; arrMon[ 1] = nYear % 4 == 0 ? 29:28;
arrMon[ 2] = 31; arrMon[ 3] = 30;
arrMon[ 4] = 31; arrMon[ 5] = 30;
arrMon[ 6] = 31; arrMon[ 7] = 31;
arrMon[ 8] = 30; arrMon[ 9] = 31;
arrMon[10] = 30; arrMon[11] = 31;
if ( nYear < 1900 || nYear > 2100 ) return false;
if ( nMonth < 1 || nMonth > 12 ) return false;
if ( nDay < 1 || nDay > arrMon[nMonth - 1] ) return false;
giYear = nYear;
giMonth = nMonth;
giDay = nDay;
return true;
}
var gMonths = new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");
with (document) {
write("<Div id='VicPopCal' onblur='parent.shutup()' style='OVERFLOW:hidden;POSITION:absolute;VISIBILITY:hidden;width:180;z-index:100;'>");
write("<table width='100%' border='1' cellpadding='0' cellspacing='0' style='background-color:#EFF7FF;border-width:1px ;border-color:#3399CC;'>");
write("<TR><TD>")
write("<table width='100%' border='0' cellpadding='0' cellspacing='0' >");
write("<TR>");
write("<td valign='middle' align='center' style='font-size:9pt;background-color:#EFF7FF' HEIGHT='28'>");
write("<SELECT name='tbSelYear' onChange='parent.fUpdateCal(tbSelYear.value, tbSelMonth.value)' style='width:80' Victor='Won'>");
for(i=1900;i<2050;i++)
write("<OPTION value='"+i+"'>"+i+" 年</OPTION>");
write("</SELECT>");
write(" <select name='tbSelMonth' onChange='parent.fUpdateCal(tbSelYear.value, tbSelMonth.value)' style='width:80' Victor='Won'>");
for (i=0; i<12; i++)
write("<option value='"+(i+1)+"'>"+gMonths[i]+"</option>");
write("</SELECT>");
write("</td>");
write("</TR><TR>");
write("<td align='center'>");
write("<table width='95%' border='1' cellspacing='0' cellpadding='0' bordercolordark='#639ace' bodercolorlight='#ffffff'>");
fDrawCal(giYear, giMonth, 20, '9pt');
write("</table>");
write("</td>");
write("</TR><TR><TD align='center'>");
write("<TABLE width='98%'><TR><TD nowrap align='center' HEIGHT='25'>");
write("<span style='cursor:hand;font-size:9pt' onclick='parent.fSetDate(0,0,0)' onMouseOver='this.style.color=parent.overcolor' onMouseOut='this.style.color=0'>清空</span>");
write("</td><td algin='center' HEIGHT='25'>");
write("<span style='cursor:hand;font-size:9pt' onclick='parent.fSetDate("+giYear+","+giMonth+","+giDay+")' onMouseOver='this.style.color=parent.overcolor' onMouseOut='this.style.color=0'> 今天: "+giYear+"-"+giMonth+"-"+giDay+"</span></td>");
write("<td nowrap HEIGHT='25'><span style='cursor:hand;font-size:9pt' onMouseOver='this.style.color=parent.overcolor' onMouseOut='this.style.color=0' onclick='parent.shutup()'>关闭</span></td></tr></table>");
write("</TD></TR>");
write("</TABLE></TD></TR></TABLE></Div>");
}
</script>
添加一个按钮:
<button onclick="fPopCalendar(invalidateDate,invalidateDate);return false" name="button" type="button">q</button>
invalidateDate为变量可任意命名
我这js都写的这么明白了!你还不知道怎么弄啊?
5、动态网页设计注册页面
单用html语言解决不了,必须用与之相配套的语言,如javascript,asp.php,vb,java等等。。。
6、有没有网页设计大作业要求有div+css+js,要有注册登录界面?
自己这五年来做了有100多套网页设计的学生作业,因为都是给学生定制的都符合学校或者学生考试期末作业的水平,都是div+css框架原创代码写的,有的有js,有的视频音乐flash的等元素的插入,各种风格主题如风景、校园、美食、动漫、lol、咖啡、民航等等主题,我都共享在大设计师论坛,需要的可以去兔费下,里面的每个页面我都有截图,像这种有注册有登录很基础的表单,大部分作业都会有这一部分,你可以看一下截图再决定下载哪一个。
7、你会做网页设计登录与注册页面吗?
这个其实蛮简单 也是WEB中最基础的东西
1.就是在SQLSERVER中建立表 来保存用户名和密码之类的信息。
2.信息获取的话 无非就是两个textbox,把密码的那个textbox的“type”属性改为“password”
3.创建数据库链接字符串 然后 sqlconnection --接着编写SQL查询语句--最后--sqlcommand。
4.这里我的方法是 用sqlcommand的Executereader方法来获取一个 datatable "dt".
然后来判断 dt的dt.rows.count属性是否大于0 如果大于0 则证明用户名与密码正确的了。 (即这行记录存在于表中)
前提是 你的SQL语句 必须这么写
select * from "保存用户信息的表" where textbox1.text=username and textbox2.text=password