JS操作 对象+js给frameset设置rows

阅读更多
### 我的应用(js给frameset设置rows)
1.框架frameset页面

  
  
	
	
	
  
  
 
 2.frametop页,如果有升级公告,将主框架页的rows调为102,否则默认为74
/*系统升级公告*/
setInterval("showUpGrade()", 1000*60*10);
function showUpGrade(){
	$.ajax({
		type:'post',
		url:'Login_showUpGrade',
		async: false ,
		dataType:'json',
		success:function(data){
	 		if(data.upGradeState=="true"){
	 			window.parent.frames['globalFrame'].rows=data.frameRows;
	 			$("#top_notice").html(data.upGradeString);
	 			$("#top_notice").css("display", "block");
	 		}
	 		else{
	 			window.parent.frames['globalFrame'].rows=data.frameRows;
	 			$("#top_notice").css("display", "none");
	 		}
	 	}
	});
}
 然后页面的

3.LoginAction中查询升级公告,并设置状态,是否有升级公告
/**
 * 显示系统升级公告
 * @author mengxianjun
 * @date 2011-11-22 下午16:09:29
 */
public void showUpGrade(){
	String upGradeString = "";
	String upGradeState = "false";//公告状态
	String frameRows = "74,*";//主frameset页的rows大小
	try {
		TUpgrade upGrade = new TUpgrade();
		upGrade.setNowDate(new Date());
		
		List upGradeList = UpGradeService.queryAll(upGrade);
		if(upGradeList.size()>0){
			upGradeString = "升级公告:";//系统升级公告字符串
			for(TUpgrade myTUpgrade: upGradeList){
				upGradeString = upGradeString+myTUpgrade.getUpgradeInfo();
			}
			upGradeState = "true";
			frameRows = "102,*";
		}
		
		PrintWriter out = this.getResponse().getWriter();
		out.print("{\"upGradeString\":\""+upGradeString+"\",\"upGradeState\":\""+
				upGradeState+"\",\"frameRows\":\""+frameRows+"\"}");
	}catch (Exception e){
		log.error("LoginAction's showUpGrade():" + e.fillInStackTrace());
	}
}
  4.sqlMap
 
============================================================================================

框架编程概述
一个HTML页面可以有一个或多个子框架,这些子框架以