[url]来自
<body topmargin="5" leftmargin="3" bottommargin="5" rightmargin="0"><center><center>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<form id="classListForm" name="classListForm" method="post">
<div align="center"><font size="3" color="black"><b>课程表</b></font></div>
<div style="padding-top:5px;padding-bottom:5px;width:100%" align=left>
<td>
<button property="new" value="新 增" οnclick="addClass();" styleClass="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'" title="新 增">新 增</button>
<button property="edit" value="修 改" οnclick="editClass();" styleClass="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'">修 改</button>
<button property="delete" value="删 除" οnclick="deleteClass();" styleClass="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'">删 除</button>
</td>
<td align=right>输入关键字:<input class="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'" type=text name="keyword">
<button property="search" value="查 找" οnclick="findClass();" styleClass="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'">查 找</button>
</td>
</div>
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr bgcolor="#dddddd" align="center"><th width="6%" align="left"><input type='checkBox' onClick= "selectAllButDisabled(this.form)" class="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'"><b style="color:black" align=center>全选</b></th>
<th width="20%"><b style="color:black" align=center>课程名称</b></th>
<th width="8%"><b style="color:black" align=center>任课老师</b></th>
<th width="7%"><b style="color:black" align=center>上课时间</b></th>
<th width="8%"><b style="color:black" align=center>下课时间</b></th>
<th width="8%"><b style="color:black" align=center>课程开始日期</b></th>
<th width="8%"><b style="color:black" align=center>课程有效日期</b></th>
<th width="40%"><b style="color:black" align=center>备注</b></th>
</tr>
<%
//声明一个DAO(IClassesDAO)接口,它的实现是ClassesDAO类,
//用这个接口可以实现查询数据库和获取数据记录,还可以进行增加、修改、删除等操作
IClassesDAO classesDAO = new ClassesDAO();
try{
//声明一个List集合,这个集合保存了数据库中的数据
List classList = classesDAO.getList();
%>
<%
int i = 0;
for( ; i < classList.size(); i++ ){
Classes clazz = ( Classes )classList.get( i );
%>
<tr>
<td><input type="checkbox" id="ClassId" name="ClassId" value="<%=clazz.getClassId()%>" onClick = "chkSelect(this.form)" class="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'"/>
<c:out value="<%=i + 1%>"/>
</td>
<td><a href="JavaScript:updateClass('${class.classId}');" title="编辑"><%=clazz.getClassName()%></a></td>
<td><%=clazz.getTeacher()%></td>
<td><%=clazz.getStartTime()%></td>
<td><%=clazz.getEndTime()%></td>
<td><%=clazz.getStartDate()%></td>
<td><%=clazz.getEndDate()%></td>
<td><%=clazz.getRemark()%></td>
</tr>
<%
}
}catch( Exception e ){
e.printStackTrace();
}
finally{
classesDAO.close();
}
%>
</table>
</form>
</table>
</body>
♂天使♀(188784048) 17:08:26
function selectAll(theFrm) {
for (i=0 ;i< theFrm.elements.length;i++){
if (theFrm.elements[i].type=="checkbox") {
theFrm.elements[i].checked = event.srcElement.checked;
}
}
}
function deselectAll(theFrm) {
for (i=0 ;i< theFrm.elements.length;i++){
if ( theFrm.elements[i].type == "checkbox" ) {
if (!theFrm.elements[i].disabled) {
if (theFrm.elements[i].checked)
theFrm.elements[i].checked=false;
else
theFrm.elements[i].checked=true;
}
}
}
}
//
function selectAllButDisabled(theFrm) {
for (i=0 ;i< theFrm.elements.length;i++){
if ( theFrm.elements[i].type == "checkbox" && theFrm.elements[i].disabled == false ) {
theFrm.elements[i].checked = event.srcElement.checked;
}
}
}
function selectAllButReadonly(theFrm) {
for (i=0 ;i< theFrm.elements.length;i++){
if ( theFrm.elements[i].type == "checkbox" && theFrm.elements[i].readonly == false ) {
theFrm.elements[i].checked = event.srcElement.checked;
}
}
}
//¨o? ¤?¨ D???D
function chkSelect(theFrm) {
for (i=0 ;i< theFrm.elements.length;i++){
if ( theFrm.elements[i].type == "checkbox" ) {
if (theFrm.elements[i].checked) return true;
}
}
return false;
}
[/url]
<body topmargin="5" leftmargin="3" bottommargin="5" rightmargin="0"><center><center>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<form id="classListForm" name="classListForm" method="post">
<div align="center"><font size="3" color="black"><b>课程表</b></font></div>
<div style="padding-top:5px;padding-bottom:5px;width:100%" align=left>
<td>
<button property="new" value="新 增" οnclick="addClass();" styleClass="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'" title="新 增">新 增</button>
<button property="edit" value="修 改" οnclick="editClass();" styleClass="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'">修 改</button>
<button property="delete" value="删 除" οnclick="deleteClass();" styleClass="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'">删 除</button>
</td>
<td align=right>输入关键字:<input class="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'" type=text name="keyword">
<button property="search" value="查 找" οnclick="findClass();" styleClass="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'">查 找</button>
</td>
</div>
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr bgcolor="#dddddd" align="center"><th width="6%" align="left"><input type='checkBox' onClick= "selectAllButDisabled(this.form)" class="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'"><b style="color:black" align=center>全选</b></th>
<th width="20%"><b style="color:black" align=center>课程名称</b></th>
<th width="8%"><b style="color:black" align=center>任课老师</b></th>
<th width="7%"><b style="color:black" align=center>上课时间</b></th>
<th width="8%"><b style="color:black" align=center>下课时间</b></th>
<th width="8%"><b style="color:black" align=center>课程开始日期</b></th>
<th width="8%"><b style="color:black" align=center>课程有效日期</b></th>
<th width="40%"><b style="color:black" align=center>备注</b></th>
</tr>
<%
//声明一个DAO(IClassesDAO)接口,它的实现是ClassesDAO类,
//用这个接口可以实现查询数据库和获取数据记录,还可以进行增加、修改、删除等操作
IClassesDAO classesDAO = new ClassesDAO();
try{
//声明一个List集合,这个集合保存了数据库中的数据
List classList = classesDAO.getList();
%>
<%
int i = 0;
for( ; i < classList.size(); i++ ){
Classes clazz = ( Classes )classList.get( i );
%>
<tr>
<td><input type="checkbox" id="ClassId" name="ClassId" value="<%=clazz.getClassId()%>" onClick = "chkSelect(this.form)" class="btn3_mouseout" style="btn3_mouseout" οnmοuseοver="this.className='btn3_mouseover'" οnmοuseοut="this.className='btn3_mouseout'" οnmοusedοwn="this.className='btn3_mousedown'" οnmοuseup="this.className='btn3_mouseup'"/>
<c:out value="<%=i + 1%>"/>
</td>
<td><a href="JavaScript:updateClass('${class.classId}');" title="编辑"><%=clazz.getClassName()%></a></td>
<td><%=clazz.getTeacher()%></td>
<td><%=clazz.getStartTime()%></td>
<td><%=clazz.getEndTime()%></td>
<td><%=clazz.getStartDate()%></td>
<td><%=clazz.getEndDate()%></td>
<td><%=clazz.getRemark()%></td>
</tr>
<%
}
}catch( Exception e ){
e.printStackTrace();
}
finally{
classesDAO.close();
}
%>
</table>
</form>
</table>
</body>
♂天使♀(188784048) 17:08:26
function selectAll(theFrm) {
for (i=0 ;i< theFrm.elements.length;i++){
if (theFrm.elements[i].type=="checkbox") {
theFrm.elements[i].checked = event.srcElement.checked;
}
}
}
function deselectAll(theFrm) {
for (i=0 ;i< theFrm.elements.length;i++){
if ( theFrm.elements[i].type == "checkbox" ) {
if (!theFrm.elements[i].disabled) {
if (theFrm.elements[i].checked)
theFrm.elements[i].checked=false;
else
theFrm.elements[i].checked=true;
}
}
}
}
//
function selectAllButDisabled(theFrm) {
for (i=0 ;i< theFrm.elements.length;i++){
if ( theFrm.elements[i].type == "checkbox" && theFrm.elements[i].disabled == false ) {
theFrm.elements[i].checked = event.srcElement.checked;
}
}
}
function selectAllButReadonly(theFrm) {
for (i=0 ;i< theFrm.elements.length;i++){
if ( theFrm.elements[i].type == "checkbox" && theFrm.elements[i].readonly == false ) {
theFrm.elements[i].checked = event.srcElement.checked;
}
}
}
//¨o? ¤?¨ D???D
function chkSelect(theFrm) {
for (i=0 ;i< theFrm.elements.length;i++){
if ( theFrm.elements[i].type == "checkbox" ) {
if (theFrm.elements[i].checked) return true;
}
}
return false;
}
[/url]