top.jsp 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  2. <html>
  3. <head>
  4. <%-- <script src="${pageContext.request.contextPath}/static/web/js/jquery-2.1.4.js"></script>--%>
  5. </head>
  6. <script type="text/javascript">
  7. $(function () {
  8. var myDate = new Date;
  9. var year = myDate.getFullYear(); //获取当前年
  10. var mon = myDate.getMonth() + 1; //获取当前月
  11. var date = myDate.getDate(); //获取当前日
  12. // var h = myDate.getHours();//获取当前小时数(0-23)
  13. // var m = myDate.getMinutes();//获取当前分钟数(0-59)
  14. // var s = myDate.getSeconds();//获取当前秒
  15. var week = myDate.getDay();
  16. var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
  17. //console.log(year, mon, date, weeks[week])
  18. $("#time").html(year + "年" + mon + "月" + date + "日" + "&nbsp;" + weeks[week]);
  19. })
  20. //收藏本站代码
  21. jQuery.fn.addFavorite = function (l, h) {
  22. return this.click(function () {
  23. var t = jQuery(this);
  24. if (jQuery.browser.msie) {
  25. window.external.addFavorite(h, l);
  26. } else if (jQuery.browser.mozilla || jQuery.browser.opera) {
  27. t.attr("rel", "sidebar");
  28. t.attr("title", l);
  29. t.attr("href", h);
  30. } else {
  31. alert("请使用Ctrl+D将本页加入收藏夹!");
  32. }
  33. });
  34. };
  35. $(function () {
  36. $('#fav').addFavorite('收藏本站', location.href);
  37. });
  38. </script>
  39. <body>
  40. <div class="header">
  41. <div class="c">
  42. <div class="header_l l"><span id="time"></span>&nbsp;</div>
  43. <div class="header_r r">
  44. <div class="pprz"><a href="javascript:;" id="fav">收藏本站</a></div>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="head">
  49. <div class="c">
  50. <div class="head_l l"><img src="${ctxStaticWeb}/images/rc_index_03.png" width="430" height="74"></div>
  51. <div class="head_r r"><a href="${ctx}/talent_web" <c:if test="${param.news_type==null}"> class="current"</c:if>>首
  52. 页</a><a href="${ctxF}/more?news_type=1" <c:if
  53. test="${param.news_type=='1'}"> class="current" </c:if>>政策法规</a><a href="${ctxF}/more?news_type=2" <c:if
  54. test="${param.news_type=='2'}"> class="current" </c:if>>通知公告</a><a href="${ctxF}/more?news_type=3" <c:if
  55. test="${param.news_type=='3'}"> class="current" </c:if>>人才计划专栏</a><a href="${ctxF}/more?news_type=5"
  56. <c:if test="${param.news_type=='5'}"> class="current" </c:if>>服务指南</a><a href="${ctxF}/invite/init"
  57. target="_blank">调查问卷</a></div>
  58. </div>
  59. </div>
  60. <div class="head_line">&nbsp;</div>
  61. <div class="clear"></div>
  62. </body>
  63. </html>