標籤:text alert doc web coding body time 格式化 rpo
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
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>
<script language="javascript" type="text/javascript"
src="js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
<% java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyy-MM-dd");
java.util.Date currentTime = new java.util.Date();//得到當前系統時間
String str_date = formatter.format(currentTime); //將日期時間格式化
%>
</script>
<div id="div1"></div>
<script>
WdatePicker({eCont:‘div1‘,onpicked:function(dp){alert()}})
</script>
</head>
<body>
</body>
</html>
Java web jsp頁面實現日曆的顯示 (/WdatePicker控制項)