.页面基本代码模板:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Keywords" content="酷我音乐,歌手列表,歌曲,音乐,试听,下载" />
<meta http-equiv="Description" content="酷我音乐,歌手清单" />
<title>歌手列表</title>
<script language="javascript" src="aaa.jsp"></script>
<link rel="stylesheet" rev="stylesheet" href="main.css?2008072156.css" type="text/css" />
<% String path = request.getContextPath(); %>
</head>
<body>
<form id="searchBox" action="<%=request.getContextPath()%>/st/SearchSongServlet" method="get">
<input type="hidden" name="pagelength" value="18" />
</form>
<a href="#P">P</a><!--此行将转至name为“p”的锚点处-->
<a href="#" name="P">↑返回顶部</a>
</body>
</html>
.设置页面编码:
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
.一个样式自定义的通用搜索框:
<div id="sch">
<input id="srchinput" name="srchinput" value="歌手、音乐搜索" οnclick="if($('srchinput').value == '歌手、音乐搜索') {$('srchinput').value = '';}" />
<a οnclick="doSch1();">
<img src="music/new_musicTop/img/searchNormal.gif" id="a"
style="border:0;"
οnmοuseup="$('a').src='music/new_musicTop/img/searchHover.gif'"
οnmοusedοwn="$('a').src='music/new_musicTop/img/searchDown.gif'"
οnmοuseοver="$('a').src='music/new_musicTop/img/searchHover.gif'"
οnmοuseοut="$('a').src='music/new_musicTop/img/searchNormal.gif'">
</img>
</a>
</div>
.下拉菜单实现:
<select name="by">
<option value="empty"></option>
<option value="byName">
按留言人昵称
</option>
<option value="byID">
按留言人ID
</option>
</select>
.单选框的赋值:
<input id=rd0 type=radio value=0 name=radioValue>没用过
<input id=rd0 type=radio value=1 name=radioValue>几次
<input id=rd0 type=radio value=2 name=radioValue>一周内
.复选框的赋值:
<input id=ck3 type=checkbox value=3 name=checkBox>下载歌曲失败
<input id=ck4 type=checkbox value=4 name=checkBox>音质、画质不理想
<input id=ck5 type=checkbox value=5 name=checkBox>界面不好看
.文本框的赋值:
希望添加:<input type=text id=hiddenText cols=30 name=textArea></input>
随便说点:<textarea name=textArea rows=4 cols=45 scrolling="yes"></textarea>