开发list

css控制字符过长显示问题

<style type="text/css">
	.demo {display: inline-block;
		*display: inline;
		*zoom: 1;
		width: 140px;
		height: 20px;
		line-height: 20px;
		font-size: 12px;
		overflow: hidden;
		-ms-text-overflow: ellipsis;
		text-overflow: ellipsis;
		white-space: nowrap;}
	.demo:hover {height: auto;white-space: normal;}
	.hiddenword {display: inline-block;*display: inline;*zoom: 1;width: 140px;line-height: 20px;font-size: 12px;overflow: hidden;-ms-text-overflow: ellipsis;text-overflow: ellipsis;white-space: nowrap;}
	}
</style>

el表达式控制字符长度问题:

<td nowrap style="text-align:center;"  title="${item.WORK_CONTENT}">
		<c:if test="${fn:length(item.WORK_CONTENT) > 10}">
				${fn:substring(item.WORK_CONTENT, 0, 10)}...
		</c:if>
		<c:if test="${fn:length(item.WORK_CONTENT) <= 10}">
				${item.WORK_CONTENT}
		</c:if>
</td>

 class="pageForm required-validate"    class="required"  不为空验证

根据两个表的数据更新其中一个表

update hr_employee h
set h.promotion_day = (select a.c from aa a where a.a = h.empid)
where h.cpny_id = '1200'
and  exists (select 1 from aa a where h.empid = a.a)

验证输入信息为整数  且不以00开头

//整数^-?\d+$     非负整数^([1-9]\d{0,9}|0)$
function onEnter(obj,index){
            var reg = /^-?\d+$/;
			var s = $(obj).val();
			var t = parseInt(s);$(obj).val(t);
			if(s.length>5){$(obj).val("0"); alertMsg.info("超出最大输入人数!")}
			if(t==0){$(obj).val("0")};
			if( !reg.test(s)){$(obj).val("0");}
}

jsp代码     onchange="onEnter(this,${i.index});"

//实时校验IE9以上// Firefox, Google Chrome, Opera, Safari, Internet Explorer from version 9

$("#WAGE_LEVEL").bind('input propertychange',function(){
                var reg = /^([^0]|[0-9]+|0)$/;
            	var s = $(this).val();
            	var t = parseInt(s);$(this).val(t);
            	if('NaN'==t){$(this).val("0");};
            	if(s.length>7){$(this).val("0"); alertMsg.info("超出最大输入数值!")}
            	if(t==0){$(this).val("0")};
            	if( !reg.test(s)){$(this).val("0");}
})

jsp代码 <input type="text" id="WAGE_LEVEL" name="WAGE_LEVEL" value="${WAGE_LEVEL}" size=40/>



$("input[class='anytime']").bind('input propertychange',function(){
		var id= $(this).attr("id");
		var lists = id.split("_");
		suGrade();sumPlanEmp(lists[2]);
		var reg = /^([^0][0-9]+|0)$/;
		var s = $(this).val();
		var t = parseInt(s);$(this).val(t);
		if(s.length>5){$(this).val("0"); alertMsg.info("超出最大输入人数!")}
		if(t==0){$(this).val("0")};
		if( !reg.test(s)){$(this).val("0");}
	});

下拉取多个值

html代码:
<td>课程名称</td>
<td>
 <select id="COURSEID" name="COURSE_NAME_CODE">
  <option value="">请选择</option>
  <c:forEach items="${courseManagerList}" var="c" varStatus="i">
	<c:if test="${c.ACTIVITY eq '1'}">

	<option value="${c.COURSE_NO}" periods="${c.COURSE_PERIODS}"<c:if                 
test="${c.COURSE_NO eq COURSE_NO}">selected="selected"</c:if>>${c.COURSE_NAME_CODE}-${c.COURSE_PERIODS}期</option>
	
   </c:if>
</c:forEach>
  </select>
</td>


js取值:
var periods = parseInt($('#COURSEID option:selected').attr('periods'));

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值