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

📄 employee.js

📁 人力资源管理系统
💻 JS
字号:
function getEmployeeNames(){

		$.ajax({
			type: 'GET',
		    url: 'FileAction.do?method=getEmployeeNames&time='+new Date().getTime(),
		    date: '',
		    timeout: 5000,
		    error: function(){
		        alert('请求员工数据出错,请稍候刷新页面!');
		    },
		    success: function(msg){
		    	
		    	if(msg=="0"){
		    		alert("暂时没有员工!");
		    	}else{
			        //alert(msg);
			        var item=msg.split("$$$$");
					//var content=null;
						
						//var oSelect=document.getElementById("DBnewsTypes");
					var oOption = null;//document.createElement("OPTION"); 
		
					var i=0;
					for(;i<item.length;i++){
							//alert(item[i]);
						//content=item[i].split("^^^^");
						oOption="<option value='"+item[i]+"'>"+item[i]+"</option>";
						//alert(oOption);
						$(oOption).appendTo("#emp_name");
					}
		    	}
		    }
		});

}


function nameNotNull(){
	$("font").empty();
		//员工名字不能为空
		if($("select")[0].value=="0"){
			$("select[@name=emp_name]").after("<font color=red>请选择一个员工</font>");
			$("select[@name=emp_name]").focus();
			return false;		
		}
		
		return true;

}

⌨️ 快捷键说明

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