用过calendar JS控件的高手进来帮我一下吧
我想在JSP页面上直接显示出我的日历,现在这个例子是点击输入框,然后显示出日历,该如何修改代码才能实现在jsp页面的指定位置显示出日历,而不需要点击啊?<%@pagela...
我想在JSP页面上直接显示出我的日历,现在这个例子是点击输入框,然后显示出日历,该如何修改代码才能实现在jsp页面的指定位置显示出日历,而不需要点击啊?
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript" src="<%=request.getContextPath()%>/js/datechoose.js"></script>
<!-- 自定义脚本 -->
<script language="javascript" type="text/JavaScript">
var oCalendarChs=new PopupCalendar("oCalendarChs");
oCalendarChs.weekDaySting=new Array("日","一","二","三","四","五","六");
oCalendarChs.monthSting=new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");
oCalendarChs.oBtnTodayTitle="今天";
oCalendarChs.oBtnCancelTitle="取消";
oCalendarChs.Init();
</script>
</head>
<body>
点击文本框日期就会显示出来:
<input type="text" name="datachange" onclick="getDateString(this,oCalendarChs)"/>
</body>
</html>
上面是我下载的JSP例子的代码。
该如何修改才能不点击 在浏览器里输入localhost:8080/工程名 就显示出日历来啊? 展开
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript" src="<%=request.getContextPath()%>/js/datechoose.js"></script>
<!-- 自定义脚本 -->
<script language="javascript" type="text/JavaScript">
var oCalendarChs=new PopupCalendar("oCalendarChs");
oCalendarChs.weekDaySting=new Array("日","一","二","三","四","五","六");
oCalendarChs.monthSting=new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");
oCalendarChs.oBtnTodayTitle="今天";
oCalendarChs.oBtnCancelTitle="取消";
oCalendarChs.Init();
</script>
</head>
<body>
点击文本框日期就会显示出来:
<input type="text" name="datachange" onclick="getDateString(this,oCalendarChs)"/>
</body>
</html>
上面是我下载的JSP例子的代码。
该如何修改才能不点击 在浏览器里输入localhost:8080/工程名 就显示出日历来啊? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询