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

📄 common.js

📁 本系统内置的测评模块可以根据学生的学习成绩以及往日的综合表现对学生的综合素质分进行自动评分操作
💻 JS
字号:
var startcount=0;
var countnum=0;
var totalscores=0;
var delobj="";
var insertobj="";
document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"195\"  height=\"40\" id=\"alerttable\" style=\"display:none;position:absolute;\">");
document.write("  <tr>");
document.write("   <td><img src=\"/images/spacer.gif\" width=\"8\" height=\"1\" border=\"0\" alt=\"\" /></td>");
document.write("   <td><img src=\"/images/spacer.gif\" width=\"138\" height=\"1\" border=\"0\" alt=\"\" /></td>");
document.write("   <td><img src=\"/images/spacer.gif\" width=\"49\" height=\"1\" border=\"0\" alt=\"\" /></td>");
document.write("   <td><img src=\"/images/spacer.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></td>");
document.write("  </tr>");
document.write("<br />");
document.write("  <tr>");
document.write("   <td colspan=\"3\"><img name=\"test_r1_c1\" src=\"/images/test_r1_c1.gif\" width=\"195\" height=\"8\" border=\"0\" id=\"test_r1_c1\" alt=\"\" /></td>");
document.write("   <td><img src=\"/images/spacer.gif\" width=\"1\" height=\"8\" border=\"0\" alt=\"\" /></td>");
document.write("  </tr>");
document.write("  <tr>");
document.write("   <td rowspan=\"2\"><img name=\"test_r2_c1\" src=\"/images/test_r2_c1.gif\" width=\"8\" height=\"32\" border=\"0\" id=\"test_r2_c1\" alt=\"\" /></td>");
document.write("   <td background=\"/images/cont.gif\"><div align=\"center\"><strong><div id=\"alertinfo\"></div></strong></div></td>");
document.write("   <td rowspan=\"2\"><img name=\"test_r2_c3\" src=\"/images/test_r2_c3.gif\" width=\"49\" height=\"32\" border=\"0\" id=\"test_r2_c3\" alt=\"\" /></td>");
document.write("   <td><img src=\"/images/spacer.gif\" width=\"1\" height=\"24\" border=\"0\" alt=\"\" /></td>");
document.write("  </tr>");
document.write("  <tr>");
document.write("   <td><img name=\"test_r3_c2\" src=\"/images/test_r3_c2.gif\" width=\"138\" height=\"8\" border=\"0\" id=\"test_r3_c2\" alt=\"\" /></td>");
document.write("   <td><img src=\"/images/spacer.gif\" width=\"1\" height=\"8\" border=\"0\" alt=\"\" /></td>");
document.write("  </tr>");
document.write("</table>");


function importtable(start)
{
	
	$('info').style.display="none";	
	if(countnum==0){countnum=1}
	if($('Checkbox1').checked==true){showAlert("处理进度:"+start*100+"/"+countnum)}else{
	showAlert("处理进度:"+parseInt(start*100/countnum*100)+"%")}
	px.importstu.importTable(start,totalscores,$F('bj'),$F('zy'),$F('xb'),$F('xbtz'),$F('xm'),$F('xh'),$F('bm'),$F('mm'),importtableback)
	
	
}

function showTotals()
{
	
	
	px.importstu.showTotals($F('bm'),showTotalsBack)
	
	
}

function showTotalsBack(e)
{
	
	
	$("total").innerHTML=e.value;
	
	countnum=parseInt(e.value.replace("共有数据条数:",""));
	
	
}

function importtableback(e)

{
	
	
	if(e.value.substring(0,3)=="End")
	{
		
		
		$('info').style.display="block";		
		totalscores+=parseInt(e.value.split("|SucCounts=|")[1])
		$("info").innerHTML=(e.value.substring(3,e.value.length)).split("|SucCounts=|")[0]+"<br/>---------<br/>";		
		$("info").innerHTML="所有操作完成 成功导入记录个数为:"+totalscores+"<br/>"+$("info").innerHTML;		
		
		closeAlert();		
		startcount=0;		
		totalscores=0;		
		
		
	}
	
	if(e.value.substring(0,5)!=="Wrong")
	
	{
		
		if(e.value.substring(0,4)=="GoOn")
		{
			
			
			startcount++;			
			$("info").innerHTML=(e.value.substring(4,e.value.length)).split("|SucCounts=|")[0]+"<br/>---------<br/>";			
			totalscores+=parseInt(e.value.split("|SucCounts=|")[1])
			importtable(startcount)
			
			
		}
		
		
	}
	else 
	{
		
		$('info').style.display="block";		
		alert((e.value.substring(5,e.value.length)));		
		closeAlert();		
		startcount=0;		
		
	}
	
	
	
}


//show AlertBox & Alert Information 
function showAlert(AlertInfo)
{
	
	$('alerttable').style.display='block';	
	$('alerttable').style.left=(document.body.offsetWidth-parseInt($('alerttable').width))/2
	$('alerttable').style.top=(document.body.offsetHeight-parseInt($('alerttable').height))/2
	$('alertinfo').innerHTML=AlertInfo;
	
	
}

//close the AlertBox

function closeAlert()
{
	
	$('alerttable').style.display='none';	
	
}

//delete [recid] from table  
function delFromRec(recid,deskobjid)
{
	
	showAlert("处理中...");	
	px.template.delFromRec(recid,delDeskObj)
	delobj=deskobjid;	
	
}

function delDeskObj(e)
{
	
	if(e.value.substring(0,5)!=="Wrong"){
		
		try
		{
			
			$("student_scores").innerHTML=e.value.split("|scores=|")[1]
			$("student_xxscores").innerHTML=e.value.split("|scores=|")[2]
			$("student_finallscores").innerHTML=e.value.split("|scores=|")[3]
			
		}
		catch(ex)
		{
			
			
		}
		Element.remove(delobj);		
		closeAlert();
		
	}
	else 
	{
		
		alert(e.value.substring(5,e.value.length));		
		closeAlert();		
		
	}
	
	
}

function insertIntoTable(deskobjid)
{
	
	showAlert("添加中...");	
	px.template.insertIntoTable($("hiddenstudentid").value,$("scorestype").value,escape($("showtext").value),$("hiddenyear").value,insertIntoDesk)
	insertobj=deskobjid;	
	//alert(pars) call Ajax
	Dialog.closeInfo();	
	
	
}

function insertIntoDesk(e)
{
	
	if(e.value.substring(0,5)!=="Wrong"){
		
		try
		{
			
			$("student_scores").innerHTML=e.value.split("|scores=|")[1]
			$("student_xxscores").innerHTML=e.value.split("|scores=|")[2]
			$("student_finallscores").innerHTML=e.value.split("|scores=|")[3]
			new Insertion.Bottom(insertobj,e.value.split("|scores=|")[0]);			
			closeAlert();			
			
		}
		catch(ex)
		{
			
			
		}
		
	}
	else 
	{
		
		alert(e.value.substring(5,e.value.length));		
		closeAlert();		
		
	}
	
	
}


function insertRec(type)
{
	
	Dialog.alert({
		url:"insert.aspx",options:{
			method:'get',parameters:"scorestype="+type
		}
	},
	{
		className:"alphacube",width:440,okLabel:"关闭"
	});	
	
	
}


function msgbox(info)
{

     return confirm(info);
     
}

function msgbox2(info,info2)
{

     if (confirm(info)){return confirm(info2)}else{return false}
     
}

⌨️ 快捷键说明

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