monthspinner.tag

来自「spring+hibernate+struts开发的校务oa系统」· TAG 代码 · 共 55 行

TAG
55
字号
<%@ tag body-content="empty" %>

<%@ taglib prefix="uic" uri="http://uitags.sf.net/uitags" %>
<%@ taglib prefix="ui" tagdir="/WEB-INF/tags" %>

<jsp:useBean id="downArrow" class="net.sf.uitags.tagutil.WidgetIdBean">
  <jsp:setProperty name="downArrow" property="pageContext" value="<%=(PageContext) getJspContext()%>" />
</jsp:useBean>

<jsp:useBean id="upArrow" class="net.sf.uitags.tagutil.WidgetIdBean">
  <jsp:setProperty name="upArrow" property="pageContext" value="<%=(PageContext) getJspContext()%>" />
</jsp:useBean>

<script type="text/javascript">
function IncrementedMonthDateObtainer() {
}
IncrementedMonthDateObtainer.prototype.getNewDate = function(currentlySelectedDate) {
  var newMonth = currentlySelectedDate.getMonth() + 1;
  currentlySelectedDate.setMonth(newMonth);
  return currentlySelectedDate;
}


function DecrementedMonthDateObtainer() {
}
DecrementedMonthDateObtainer.prototype.getNewDate = function(currentlySelectedDate) {
  var newMonth = currentlySelectedDate.getMonth() - 1;
  currentlySelectedDate.setMonth(newMonth);
  return currentlySelectedDate;
}
</script>

<div style="margin:0px 5px 0px 1px;">
  <ui:commonImage
      id="<%=upArrow.getId()%>"
      src="includes/img/up.gif"
      style="display:block; border:0px;"
      value="previous"
      css="uiCalendar_previousMonth"
      title="Previous Month"
      />
  <uic:updateDate injectTo="<%=upArrow.getId()%>"
      dateObtainer="new DecrementedMonthDateObtainer()" />

  <ui:commonImage
      id="<%=downArrow.getId()%>"
      src="includes/img/down.gif"
      style="display:block; border:0px;"
      value="next"
      css="uiCalendar_nextMonth"
      title="Next Month"
      />
  <uic:updateDate injectTo="<%=downArrow.getId()%>"
      dateObtainer="new IncrementedMonthDateObtainer()" />
</div>

⌨️ 快捷键说明

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