常记溪亭日暮,
沉醉不知归路。
兴尽晚回舟,
误入藕花深处。
争渡,争渡,
惊起一滩鸥鹭。
2
列表项1
底层列表项列表项2- 子列表项
- 子列表项
- 底层列表项1
- 底层列表项2
列表项3
3
辅助参考书
课程名称
web程序设计
任课教师或参与论证教师
使用班级
10计81、82
教材名称
Javaweb程序设计
ISBN
9787302232889
作者
郭克华
出版社
清华大学出版社
出版年份
2012年
4
网页的背景声音
\javaweb\实验一\html\陈升-路口.mp3"loop="1">
实验二
请填写个人信息
xiangqiancao@name=invest>
姓名:
博客:
//"/>
密码:
请上传你的照片:
请选择你喜欢的音乐:
摇滚乐爵士乐
流行乐
请选择你居住的城市:
北京
上海
南京
实验三
欢迎
functionbclick()
{
varstr1=op1.innerText;
varstr2=op2.innerText;
variop1=parseInt(str1);
variop2=parseInt(str2);
result.innerText=iop1+iop2;
}
welcome
请输入第一个数:
underline">1
请输入第二数:
underline">1
相加的和:
2
欢迎
functioncheckvalid()
{
varstrmsg=login.pwd.value;
variresult=parseInt(strmsg);
varnewresult=""+iresult;
if(newresult!
=strmsg)
{
alert("你的输入不合法,请重新输入");
login.pwd.value="";
}
}
欢迎光临
3
欢迎
functionshow(month,date)
{
da=document.getElementById("txtyear").value;
varyear=da.substring(0,4);
varmonth=da.substring(5,7);
vardate=da.substring(8,10);
varf1=da.substring(4,5);
varf2=da.substring(7,8);
if(f1!
="-"||f2!
="-")
{
alert("你输入的出生日期有错,请重新输入!
");
txtyear.value="";
txtMonth.value="";
txtDay.value="";
login.text3.value="";
}
if(month<1||month>12||date<1||date>31){
alert("你输入的出生日期有错,请重新输入!
");
txtyear.value="";
txtMonth.value="";
txtDay.value="";
login.text3.value="";
}
if(month==1&&date>=20||month==2&&date<=18){login.text3.value="水瓶座";}
if(month==2&&date>=19||month==3&&date<=20){login.text3.value="双鱼座";}
if(month==3&&date>=21||month==4&&date<=19){login.text3.value="白羊座";}
if(month==4&&date>=20||month==5&&date<=20){login.text3.value="金牛座";}
if(month==5&&date>=21||month==6&&date<=21){login.text3.value="双子座";}
if(month==6&&date>=22||month==7&&date<=22){login.text3.value="巨蟹座";}
if(month==7&&date>=23||month==8&&date<=22){login.text3.value="狮子座";}
if(month==8&&date>=23||month==9&&date<=22){login.text3.value="处女座";}
if(month==9&&date>=23||month==10&&date<=22){login.text3.value="天秤座";}
if(month==10&&date>=23||month==11&&date<=21){login.text3.value="天蝎座";}
if(month==11&&date>=22||month==12&&date<=21){login.text3.value="人马座";}
if(month==12&&date>=22||month==1&&date<=19){login.text3.value="摩羯座";}
}
请入你的出生日期:
你的星座是:
实验四
欢迎
functioncheckvalid()
{
varflag=1;
varname=document.getElementById("username").value;
varstrtel=document.getElementById("tel").value;
varstrpwd=document.getElementById("pwd").value;
varstrpwd1=document.getElementById("pwd1").value;
vari;
varch;
for(i=0;i{
ch=name.charAt(i);
if(ch>='a'&ch<='z'||ch>='A'&ch<='Z')
{
continue;
}
alert("你的输入不合法,请重新输入!
");
username.value="";
flag=0;
}
if(strtel.length==7||strtel.length==8||strtel.length==11||strtel.length==12)
{
for(i=0;i{
ch=strtel.charAt(i);
if(ch>='0'&ch<='9')
{
continue;
}
alert("你输入电话有误,请重新输入!
");
tel.value="";
flag=0;
}
}
else
{
alert("电话输入有误,请重新输入!
");
tel.value="";
flag=0;
}
for(i=0;i{
ch=strpwd.charAt(i);
if(ch>='a'&ch<='z'||ch>='A'&ch<='Z'||ch>='0'&ch<='9')
{
continue;
}
alert("你的密码输入格式错误,请重新输入!
");
pwd.value="";
flag=0;
}
if(!
(strpwd==strpwd1))
{
alert("你的两次密码输入不一样,请重新输入!
");
flag=0;
pwd.value="";
pwd1.value="";
}
if(flag==1)
alert("提交成功!
");
}
用户名:
(只能是英文字母组合)
密码:
(英文字母和数字组合)
确认密码:
电话:
(7,8,11,12的数字组合)
实验五
1
<%@pagelanguage="java"contentType="text/html;charset=GBK"%>
比特赛维斯培训
<%
if(application.getAttribute("count")==null)
{
application.setAttribute("count","1");
}
else
{
StringstrTemp=application.getAttribute("count").toString();
intnCount=Integer.valueOf(strTemp).intValue()+1;
application.setAttribute("count",""+nCount);
}
%>
你是第<%=application.getAttribute("count")%>位访问者
7-7.html
hello
7-7.jsp
<%@pagelanguage="java"import="java.util.*"pageEncoding="ISO-8859-1"contentType="text/html;charset=gb2312"%>
functionscrollwindow()
{
this.scroll(0,65000);
setTimeout('scrollwindow()',200);
}
scrollwindow();
<%=application.getAttribute("words")%>
7-8.jsp
<%@pagelanguage="java"import="java.util.*"pageEncoding="ISO-8859-1"contentType="text/html;charSet=GBK"%>
<%
request.setCharacterEncoding("GBK");
Stringmywords=request.getParameter("message");
application.log(mywords);
if(mywords!
=null)
{
intlen=mywords.length();
intflag=1;
application.log(""+len);
for(inti=0;i{
if(mywords.charAt(i)=='<')
flag=0;
}
if(flag==1)
{
mywords=">>:
"+mywords;
Objectobj=application.getAttribute("words");
if(obj==null)
application.setAttribute("words",mywords);
elseapplication.setAttribute("words",obj.toString()+mywords+"
");
}
}
%>
实验七
<%@pagecontentType="text/html;charset=GB2312"%>
用户名:
密码:
重新填写密码:
性别:
男
女
所在城市: