⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selectteacher.jsp

📁 培训考试系统代码
💻 JSP
字号:
<%@ page language = "java" contentType="text/html;charset=gb2312"%>


<%@ page import = "com.huawei.icd30.common.db.*"%>




<%@ page import = "com.huawei.icd30.agt.util.*" %>



<%    Object sessionRs         =  request.getAttribute("GET-TEACHER-RESULTSET");


      SysResultSet turnOrderRs =  sessionRs == null ?null:(SysResultSet)sessionRs;

%>



<html>


<head>


<title>教师选择页面 </title>
<link href="/agt/public/css/gb.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>


<body bgcolor="B7D5F9" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >

<form name="form1">

  <table width="450" border="0" cellpadding="3" cellspacing="1" class="table-cs1">
    <tr align="center"> 
      <td height="25" class="td-cs1">未被选择的姓名(工号)</td>
      <td width="100" rowspan="2" class="td-cs2"> 
        <p><br>
          <br>
          <br>
        </p>
        <p> <br>
          <input name="choise1" type="image" onClick="changeOptions('document.forms[0].outStaffNo' ,'document.forms[0].inStaffNo');return false;" src="/agt/public/images/choise1.gif" width="82" height="22" border="0" onMouseOver="this.src='/agt/public/images/'+ this.name + '_2.gif';" onMouseOut="this.src='/agt/public/images/'+ this.name + '.gif'">
          <br>
          <input name="del1" type="image" onclick="changeOptions('document.forms[0].inStaffNo' ,'document.forms[0].outStaffNo');return false;" src="/agt/public/images/del1.gif" width="82" height="22" border="0" onmouseover="this.src='/agt/public/images/'+ this.name + '_2.gif';" onmouseout="this.src='/agt/public/images/'+ this.name + '.gif'">
        </p></td>
      <td height="25" class="td-cs1">已被选择的姓名(工号)</td>
    </tr>
    <tr align="center"> 
      <td class="td-cs1"> <select name="outStaffNo" class="listbox" multiple title="未被选择的姓名(工号)" ondblclick="changeOptions('document.forms[0].outStaffNo' ,'document.forms[0].inStaffNo')">
          <%


        if( turnOrderRs != null && turnOrderRs.getMetaData().getRecordCount() != 0 )


        {


           //此处是用来显示结果


           for(int i=0; turnOrderRs.setRecord(i)&&(i<turnOrderRs.getMetaData().getRecordCount()); i++)


           {


%>
          <option value="<%=turnOrderRs.getString(0)%>"><%=turnOrderRs.getString(1)%>(<%=turnOrderRs.getString(0)%>)</option>
          <%          }


        }


%>
        </select> </td>
      <td class="td-cs1"><select name="inStaffNo" class="listbox" multiple title="已被选择的姓名(工号)" ondblclick="changeOptions('document.forms[0].inStaffNo' ,'document.forms[0].outStaffNo')">
        </select></td>
    </tr>
  </table>
  <table width="450" height="30" border="0" cellpadding="0" cellspacing="0">
    <tr> 
      <td height="35" align="center"> <table width="44%" height="25" border="0" cellpadding="0" cellspacing="0">
          <tr align="left"> 
            <td width="50%"><input name="ok" type="image" onClick="return returnStaffNo();" src="/agt/public/images/ok.gif" width="82" height="22" border="0" onMouseOver="this.src='/agt/public/images/'+ this.name + '_2.gif';" onMouseOut="this.src='/agt/public/images/'+ this.name + '.gif'"> 
            </td>
            <td width="50%"><input name="cancel" type="image" onclick="window.close();" src="/agt/public/images/cancel.gif" width="82" height="22" border="0" onmouseover="this.src='/agt/public/images/'+ this.name + '_2.gif';" onmouseout="this.src='/agt/public/images/'+ this.name + '.gif'"> 
            </td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>


  


 


 </body>


 </html>


 


 <script src="/agt/public/js/scriptfuns.js" type="text/javascript"></script>


 <script  language="JavaScript">


function returnStaffNo()


{


    var inStaffNo = document.forms[0].inStaffNo ;


    var len = inStaffNo.options.length ;
    
    if(len > 1)
    {
       alert("对不起只能选择一位评卷教师,请重新进行选择。")
       
       return false;
    }
    
    if(len == 1)
    {
        opener.document.forms[0].teacherId.value =  inStaffNo.options[0].value  ;
    }
    if(len == 0)
    {
        opener.document.forms[0].teacherId.value = "";
    }
    window.close() ;

}

    function init()
    {    
        var staffNo  = opener.document.forms[0].teacherId.value;
        var outStaffNo = document.forms[0].outStaffNo;
       
        for(var j = 0; j<outStaffNo.length; j++)
        {
            if(staffNo == outStaffNo[j].value)
            {
                var opt = new Option(outStaffNo[j].text,staffNo) ;
                outStaffNo.options.remove(j);
                document.forms[0].inStaffNo.add(opt);
            }
        }                                 
    }
    
    
    init();

</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -