JS相关

1.将页面分成几块,可进行按块刷新。 写道
说明:利用frame,将页面进行分块,可进行某一块的刷新,实例如下。

 

<script>
function iFrameHeight() {   
	var ifm= document.getElementById("M1");   
	var subWeb = document.frames ? document.frames["M1"].document : ifm.contentDocument;   
	if(ifm != null && subWeb != null) {
	   ifm.height = subWeb.body.scrollHeight;
	}
}
function goT(id){
	document.getElementById('M1').style.display='block';
	document.getElementById('M1').src='beautyClassDetail.htm?beautyClassBoundId='+id;
}
</script>

<a href="JavaScript:void(0)" οnclick="goT(${displayTable.id})" >${displayTable.id}</a>
<script>
function iFrameHeight() {   
	var ifm= document.getElementById("M1");   
	var subWeb = document.frames ? document.frames["M1"].document : ifm.contentDocument;   
	if(ifm != null && subWeb != null) {
	   ifm.height = subWeb.body.scrollHeight;
	}
}
function goT(id){
	document.getElementById('M1').style.display='block';
	document.getElementById('M1').src='beautyClassDetail.htm?beautyClassBoundId='+id;
}
</script>

<a href="JavaScript:void(0)" οnclick="goT(${displayTable.id})" >${displayTable.id}</a>


<iframe id="M1" name="M1" frameBorder=0 scrolling=no width="100%" onLoad="iFrameHeight();"  
style="display: none"></iframe>

 

2.ExtJs时间组件
 
Ext.onReady(function(){
	Ext.QuickTips.init();
	var startTime = new Ext.form.DateField({
		id:'startTime',    
    	applyTo : 'startTime',       
   		format: 'Y-m-d',
		altFormats: 'Ymd',
		vtype: 'daterange',
		endDateField: 'endTime'
    });
	var endTime = new Ext.form.DateField({
		id:'endTime',
    	applyTo : 'endTime',
    	format: 'Y-m-d',
    	altFormats: 'Ymd',
    	vtype: 'daterange',
    	startDateField: 'startTime'
    });
     points = new Ext.form.NumberField({
	applyTo : 'points',
	allowBlank : false,
	decimalSeparator : '.',
	decimalPrecision : 2,
	minValue : 0,
	maxValue : 99999999,
	blankText : "<fmt:message key='points.required'/>"
	});
});
function checkDate(startTime,endTime){
	var dateS=document.getElementById(startTime).value;
	var dateN=document.getElementById(endTime).value;
	if(Date.parse(dateS.replace('-','/'))>Date.parse(dateN.replace('-','/'))){
		alert('<fmt:message key="points.dateError"/>');
		document.getElementById(endTime).value='';
		return false;
	}
	else 
		return true;
}

function check(){
	if(!points.validateValue(points.getValue())){
		alert("<fmt:message key='points.error'/>");
		checkPoints();
		return false;
	}
	if(!reason.validateValue(reason.getValue())){
		alert("<fmt:message key='points.required'/>");
		
		return false;
	}
	if(!adjustmentCategoryId.validateValue(adjustmentCategoryId.getValue())){
		alert("<fmt:message key='points.required'/>");
		return false;
	}
	else{
		return true;
	}
}
 

 

<c:if test="${storeModifyBO.flag =='success'}">
		alert("<fmt:message key='points.updatesuccess'/>");
		window.parent.location.href="storeModify.htm";
</c:if>
 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值