模态窗口

function submitSql(){
	
		var v=showModalDialog("empDept.pr.prSelectDept.do","","dialogHeight=300px;dialogWidth=350px;help=no;status:0;");
		if(v!=""){
			var arr=v.split(";");
			var dNum=parseInt(arr[0]);
			var dName=arr[1];
		
			document.getElementById("deptId").value=dNum;
			document.getElementById("deptName").value=dName;
		
		}
		
	}

	function dept(){
	   var arrDept=document.getElementsByName("dept");
		   for(i=0;i<arrDept.length;i++){
		   	  if(arrDept[i].checked){
		   	     	 window.returnValue=arrDept[i].value;
		   	     	 self.close();
		   	     }
		   	  }
	}
	
	function selfClose(){
		window.returnValue="";
		window.close();
	}

你可能感兴趣的:(模态窗口)