年月日显示不出来
<%@page contentType="text/html;charset=UTF-8"%><%@ taglib uri="http://struts. prefix="bean"%>
<%@ taglib uri="http://struts. prefix="html"%>
<%@ taglib uri="http://struts. prefix="logic"%>
<%@ taglib uri="http://struts. prefix="nested"%>
<html>
<head>
<link href="../genano/admin/css/admin.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
// Example content CSS (should be your site CSS)
content_css : "css/content.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script>
<script type="text/javaScript">
<!--
function window.onload()
{
strYYYY = document.addJobForm.ryear.outerHTML;
strMM = document.addJobForm.rmonth.outerHTML;
strDD = document.addJobForm.rday.outerHTML;
MonHead = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
//先给年下拉框赋内容
var y = new Date().getFullyear();
var str = strYYYY.substring(0, strYYYY.length - 9);
for (var i = y; i < (y+30); i++) //以今年为准,后30年
{
str += "<option value='" + i + "'> " + i + "</option>\r\n";
}
document.addJobForm.ryear.outerHTML = str +"</select>";
//赋月份的下拉框
var str = strMM.substring(0, strMM.length - 9);
for (var i = 1; i < 13; i++)
{
str += "<option value='" + i + "'> " + i + "</option>\r\n";
}
document.addJobForm.rmonth.outerHTML = str +"</select>";
document.addJobForm.ryear.value = y;
document.addJobForm.rmonth.value = new Date().getMonth() + 1;
var n = MonHead[new Date().getMonth()];
if (new Date().getMonth() ==1 && IsPinYear(YYYYvalue)) n++;
writeDay(n); //赋日期下拉框
document.addJobForm.rday.value = new Date().getDate();
}
function ryearAndDay(str) //年发生变化时日期发生变化(主要是判断闰平年)
{
var MMvalue = document.addJobForm.rmonth.options[document.addJobForm.rmonth.selectedIndex].value;
if (MMvalue == ""){rday.outerHTML = strDD; return;}
var n = MonHead[MMvalue - 1];
if (MMvalue ==2 && IsPinYear(str)) n++;
writeDay(n)
}
function rmonthAndDay(str) //月发生变化时日期联动
{
var YYYYvalue = document.addJobForm.ryear.options[document.addJobForm.ryear.selectedIndex].value;
if (str == ""){rday.outerHTML = strDD; return;}
var n = MonHead[str - 1];
if (str ==2 && IsPinYear(YYYYvalue)) n++;
writeDay(n)
}
function writeDay(n) //据条件写日期的下拉框
{
var s = strDD.substring(0, strDD.length - 9);
for (var i=1; i<(n+1); i++)
s += "<option value='" + i + "'> " + i + "</option>\r\n";
document.addJobForm.rday.outerHTML = s +"</select>";
}
function IsPinYear(year) //判断是否闰年
{
return ((0 == year%4 && (year%100 !=0))|| year%400 == 0);
}
-->
</script>
</head>
<body>
<div id ="news_main">
<div id ="pos">
<table cellspacing=0 cellpadding=0 width="100%" align=center border=0>
<tr height=28>
<td background="../genano/admin/images/title_bg1.jpg"> 当前位置: 首页 >> 新闻中心 >> 集能新闻 >> 添加新闻 </td></tr>
<tr>
<td bgColor=#b1ceef height=1></td></tr>
<tr height=20>
<td background="../genano/admin/images/shadow_bg.jpg"></td></tr></table>
</div>
<div id ="newsadd">
<form name="addJobForm" action="/genano/add_job.do?method=insert" method="post">
<table width="760px" border ="0" cellpadding="3px" cellspacing ="0">
<tr>
<td width="100px">名称:</td>
<td>
<logic:present name="zhaopinFormBean">
<html:text name="zhaopinFormBean" property="jobName" style="width:200px;"/>
</logic:present>
<logic:notPresent name="zhaopinFormBean">
<input type ="text" class ="inp6" name="jobName"/>
</logic:notPresent>
<html:errors property="jobName"/></td>
</tr>
<tr>
<td width="100px">性质:</td>
<td>
<html:select name="zhaopinFormBean" property="jobFeature" style="60px">
<html:option value="0">全职</html:option>
<html:option value="1">兼职</html:option>
</html:select>
</td>
</tr>
<tr>
<td width="100px">发布日期:</td>
<td><table border ="0" width="390px">
<tr>
<td width="130px">年:<html:select name="zhaopinFormBean" property="ryear" style="width:80px" onchange="ryearAndDay(this.value)">
<logic:notEmpty name="zhaopinFormBean" scope="request">
<html:option value="">请选择年</html:option>
</logic:notEmpty>
</html:select>
</td>
<td width="130px">月:<html:select name="zhaopinFormBean" property="rmonth" style="width:100px" onchange ="rmonthAndDay(this.value)">
<logic:notEmpty name="zhaopinFormBean" scope="request">
<html:option value="">请选择月份</html:option>
</logic:notEmpty>
</html:select>
</td>
<td width="130px" align="left">日:<html:select name="zhaopinFormBean" property="rday" style="width:80px" >
<logic:notEmpty name="zhaopinFormBean" scope="request">
<html:option value="">请选择日</html:option>
</logic:notEmpty>
</html:select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100px">工作经验:</td>
<td>
<logic:present name="zhaopinFormBean">
<html:text name="zhaopinForm" property="workExperience" style="width:200px;"/>
</logic:present>
<logic:notPresent name="zhaopinFormBean">
<input type ="text" class ="inp6" name="workExperience"/>
</logic:notPresent>
</td>
</tr>
<tr>
<td width="100px">学历要求:</td>
<td>
<html:select name="zhaopinFormBean" property="education" style="width:100px;height:22px;line-height:22px;vertical-align:middle;border: 1px groove ;">
<html:option value="高中及以下">高中及以下</html:option>
<html:option value="大专以上">大专以上</html:option>
<html:option value="本科以上">本科以上</html:option>
<html:option value="研究生以上">研究生以上</html:option>
<html:option value="博士以上">博士以上</html:option>
</html:select>
</td>
</tr>
<tr>
<td width="100px">招聘人数:</td>
<td>
<logic:present name="zhaopinFormBean">
<html:text name="zhaopinFormBean" property="zhaopinNum" style="width:200px;"/>
</logic:present>
<logic:notPresent name="zhaopinFormBean">
<input type ="text" class ="inp6" name="zhaopinNum"/>
</logic:notPresent></td>
</tr>
<tr>
<td width="100px">语言能力:</td>
<td>
<logic:present name="zhaopinFormBean">
<html:text name="zhaopinFormBean" property="language" style="width:200px;"/>
</logic:present>
<logic:notPresent name="zhaopinFormBean">
<input type ="text" class ="inp6" name="language"/>
</logic:notPresent></td>
</tr>
<tr>
<td width="100px">简历语言:</td>
<td>
<logic:present name="zhaopinFormBean">
<html:text name="zhaopinFormBean" property="resumeLang" style="width:200px;"/>
</logic:present>
<logic:notPresent name="zhaopinFormBean">
<input type ="text" class ="inp6" name="resumeLang"/>
</logic:notPresent></td>
</tr>
<tr>
<td>职位要求:</td>
<td>
<logic:present name="zhaopinFormBean">
<html:textarea name="zhaopinFormBean" property="jobRequire" style="width:600px;height:260px"></html:textarea>
</logic:present>
<logic:notPresent name="zhaopinFormBean">
<textarea class ="inp7" name="jobRequire" rows="10" cols="70"></textarea>
</logic:notPresent></td>
</tr>
<tr>
<td>职位描述:</td>
<td>
<logic:present name="zhaopinFormBean">
<html:textarea name="zhaopinFormBean" property="jobDescribe" style="width:600px;height:260px"></html:textarea>
</logic:present>
<logic:notPresent name="zhaopinFormBean">
<textarea class ="inp7" name="jobDescribe" rows="10" cols="70"></textarea>
</logic:notPresent></td>
</tr>
<tr>
<td width="100px">截止日期:</td>
<td><table border ="0" width="390px">
<tr>
<td width="130px">年:<html:select name="zhaopinFormBean" property="dyear" style="width:78px" onchange="dyearAndDay(this.value)">
<logic:notEmpty name="zhaopinFormBean" scope="request">
<html:option value="">请选择年</html:option>
</logic:notEmpty>
</html:select>
</td>
<td width="130px">月:<html:select name="zhaopinFormBean" property="dmonth" style="width:80px" onchange ="dmonthAndDay(this.value)">
<logic:notEmpty name="zhaopinFormBean" scope="request">
<html:option value="">请选择月份</html:option>
</logic:notEmpty>
</html:select>
</td>
<td width="386px" align="left">日:<html:select name="zhaopinFormBean" property="dday" style="width:75px" >
<logic:notEmpty name="zhaopinFormBean" scope="request">
<html:option value="">请选择日</html:option>
</logic:notEmpty>
</html:select>
</td>
</tr>
<tr>
<td colspan="2" align="center"><input name="submit" type="submit" class="inp8" value=""/></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
</div>
<div id ="news_bottom">
<div class ="hrr"></div>
<div id ="copyright"> <span>2010版权所有 © 中电集能电力设备(北京)有限公司 网站备案号:</span><br />
<span>公司地址:北京市西城区月坛北街26号恒华国际商务中心C座1602室 电话:010-58566691 010-58566692 传真:010-58566693 邮编:100045 </span>
</div>
</div>
</body>
</html>