1.只能输入中文
οnkeyup="value=value.replace(/[u4e00-u9fa5]/g,'')"
2.只能输入英文
οnkeyup="value=value.replace(/[^a-zA-Z]/g,'')"
3.获取月份
<script type="text/javascript">
var d=new Date();
//document.getElementById('startTime').value=d.getFullYear() +'-'+( d.getMonth()+1)+'-'+d.getDate()+' ' + d.getHours()+':'+d.getMinutes()+':'+d.getSeconds();
$("#waterStartTime").val(d.getFullYear() +'-'+( d.getMonth()+1)+'-'+(d.getDate())+' ' + '00:00:00');
$("#waterEndTime").val(d.getFullYear() +'-'+( d.getMonth()+1)+'-'+(d.getDate())+' ' + '23:59:59');
</script>
4.字符串转int
parseInt(ccusOrgId)
οnkeyup="value=value.replace(/[u4e00-u9fa5]/g,'')"
2.只能输入英文
οnkeyup="value=value.replace(/[^a-zA-Z]/g,'')"
3.获取月份
<script type="text/javascript">
var d=new Date();
//document.getElementById('startTime').value=d.getFullYear() +'-'+( d.getMonth()+1)+'-'+d.getDate()+' ' + d.getHours()+':'+d.getMinutes()+':'+d.getSeconds();
$("#waterStartTime").val(d.getFullYear() +'-'+( d.getMonth()+1)+'-'+(d.getDate())+' ' + '00:00:00');
$("#waterEndTime").val(d.getFullYear() +'-'+( d.getMonth()+1)+'-'+(d.getDate())+' ' + '23:59:59');
</script>
4.字符串转int
parseInt(ccusOrgId)