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

📄 selectskill.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-SKILL-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="20" rowspan="2" class="td-cs2"> 
        <p><br>
          <br>
          <br>
        </p>
        <p> <br>
          <input name="choise1" type="image" onClick="changeOptions('document.forms[0].outSkill' ,'document.forms[0].inSkill');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].inSkill' ,'document.forms[0].outSkill');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><select name="outSkill" class="listbox" size="10" multiple title="未被选择的技能" ondblclick="changeOptions('document.forms[0].outSkill' ,'document.forms[0].inSkill')">
          <%


        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)%></option>
          <%          }


        }


%>
        </select></td>
      <td class="td-cs1"><select name="inSkill" class="listbox" size="10" multiple title="已被选择的技能">
        </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="returnSkill();return false;" 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();return false;" 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 returnSkill()


{


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


    var rValue = "" ;


    var rText = "" ;


    var len = inSkill.options.length ;


    for(var i=0 ;i<len ;i++)


    {


        var skillId = inSkill.options[i].value ;


        var skillName = inSkill.options[i].text ;


        if(skillId != null && trim(skillId) != "")


        {


            if(trim(rValue) != "")   rValue = rValue + "#" + skillId ;


            else rValue = skillId ;


            if(trim(rText) != "")   rText = rText + "," + skillName ;


            else rText = skillName ;


        }


    }


    dialogArguments.skillIds.value = rValue ;


    dialogArguments.skillNames.value = rText ;


    


    window.close() ;


}

    function init()
    {    
        var skillId  = dialogArguments.skillIds.value.split("#");
        var skillName   = dialogArguments.skillNames.value.split(",");
        var outSkill = document.forms[0].outSkill;
        for( var i = 0; i < skillId.length; i++)
        {
             var opt = new Option(skillName[i],skillId[i]) ;
             for(var j = 0; j<outSkill.length; j++)
             {
                 if(skillId[i] == outSkill[j].value)
                 {
                     outSkill.options.remove(j);
                     document.forms[0].inSkill.add(opt);
                 }
             }
             
        }
        
       
    }
    init();

 





</script>

⌨️ 快捷键说明

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