查询页面:
教师可查询本人的总得分、各分项得分及所在院(系)的平均分,也可以查看全院老师的整体排名。并可通过数据库的历史记录对以往的得分进行同样的操作。
图5-1 查询流程图
代码如下:
function AddSe(){
var val,val_tmp,Sql,oAdd,TextType;
var Field,Condition,TextVal,Relation;
Field=frm_Search.Field.options[frm_Search.Field.selectedIndex].text;
TextVal="'"+frm_Search.TextVal.value+"'" ; Condition=frm_Search.Condition.options[frm_Search.Condition.selectedIndex].text; Relation=frm_Search.Relation.options[frm_Search.Relation.selectedIndex].text;
val_tmp = frm_Search.Field.value;
val_tmp = val_tmp.substring(0,1);
//判断字段的数据类型,如果为1,就是字符、日期型;为2,就是数值型;
if (val_tmp==1)
{TextType="'"+frm_Search.TextVal.value+"' " ;}
else
{TextType=""+frm_Search.TextVal.value+" " ;}
val_Field = frm_Search.Field.value;
val_Field = val_Field.substr(1);
val= val_Field + frm_Search.Condition.value + TextType + frm_Search.Relation.value ;
Sql = Field+Condition+TextVal+Relation;
oAdd=document.createElement("option")
oAdd.value=val;
oAdd.text=Sql;
frm_Search.seSql.add(oAdd);
}
//把条件查询语句从<select>查询列表框中删除;
function moveSe(){
for (i=1;i<frm_Search.seSql.options.length;i++){
if(frm_Search.seSql.options[i].selected){
frm_Search.seSql.remove(frm_Search.seSql.selectedIndex);
}
}
}
//取得查询条件,并提交;
function getVal(){
var gettxt,Setable;
gettxt = "";
var path = window.location.pathname ; //取得页面链接和文件名
var line = path.lastIndexOf("/"); //取得最后一个'/'的位置
var dot = path.indexOf("."); //取得第一个'.'的位置
var Name = path.substring(line+1,dot); //取得文件名
var fileName = Name + ".asp";
for (i=1;i<frm_Search.seSql.options.length;i++){
gettxt = gettxt+ " " + frm_Search.seSql.options[i].value ;}
var valLeng=gettxt.lastIndexOf(" ");
gettxt=gettxt.substr(0,valLeng); //去掉条件子句的最后一个关系运算符
Setable = frm_Search.Setable.value ;
//window.open (fileName+'?gettxt='+gettxt,'_self'); //向当前页面传送查询条件子句
首页 上一页 4 5 6 7 8 9 10 下一页 尾页 7/12/12
基于Web的网上评教系统(七)由毕业论文网(www.huoyuandh.com)会员上传。