⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 copy of s_changeitem.jsp

📁 高等院校计算机专业毕业设计指导及开发实例丛书-项目申报系统
💻 JSP
📖 第 1 页 / 共 3 页
字号:
            if (!(info.substring(2)=="00")) f1.elements[ObjID].options[i] = null
         }
     }
     var b=0
     var indexarr = new Array()
     for (i=0;i<f1.elements[ObjID].length;i++)
     {   value1 = f1.elements[ObjID].options[i].value
         if (value1.substring(2)=="00"){
           if (f1.elements[ObjID].length==i+1)
              f1.elements[ObjID].options[i]=null
           else
           {  value2 = f1.elements[ObjID].options[i+1].value
              if (value2.substring(2)=="00"){
              indexarr[b]=i
              b++
           }
     }
        }
    }
    for (var c=0;c<b;c++){
             f1.elements[ObjID].options[indexarr[c]-c]=null
         }
  }
}
function isValidDate( year, month, day )
{
   year  = parseInt(year,10);
   month = parseInt(month,10);
   day   = parseInt(day,10);

   if ( month==4 || month==6 || month==9 || month==11 )
   { if ( day < 1 || day > 30 )
     {// alert( "日期在1 - 30之间" );
       return (false);
     }
   }
   else
   { if ( month!=2 )
     { if ( day < 1 || day > 31 )
       {//  alert( "日期在1 - 31之间" );
          return (false);
       }
     }
     else
     { // month == 2
       if ( ( year % 100 ) != 0 && (year % 4 == 0) || ( year % 100 ) == 0 && ( year % 400) == 0 )
       { if ( day > 29 )
         {//  alert( "日期在1 - 29之间" );
            return (false);
         }
       }
       else
       { if ( day > 28 )
         {// alert( "日期在1 - 28之间" );
           return (false);
         }
       }
     }
   }
 return (true);
}
function Jtrim(str)
{

        var i = 0;
        var len = str.length;
        if ( str == "" ) return( str );
        j = len -1;
        flagbegin = true;
        flagend = true;
        while ( flagbegin == true && i< len)
        {
           if ( str.charAt(i) == " " )
                {
                  i=i+1;
                  flagbegin=true;
                }
                else
                {
                        flagbegin=false;
                }
        }

        while  (flagend== true && j>=0)
        {
            if (str.charAt(j)==" ")
                {
                        j=j-1;
                        flagend=true;
                }
                else
                {
                        flagend=false;
                }
        }

        if ( i > j ) return ("")

        trimstr = str.substring(i,j+1);
        return trimstr;
}
function checktheform()
{
       var f1=document.theform;
	
	if (Jtrim(f1.item_name.value) == "")
	{
		window.alert("您尚未填写项目名称。");
		f1.item_name.focus();
		return false;
	}

	if ( ! isValidDate(f1.begin_year.value, f1.begin_month.value, "01" ))
	{
		window.alert("起始日期不合法。");
		f1.begin_year.focus();
		return false;
	}

	if ( ! isValidDate(f1.finish_year.value, f1.finish_month.value, "01" ))
	{
		window.alert("终止日期不合法。");
		f1.finish_year.focus();
		return false;
	}

	if (Jtrim(f1.applicant.value) == "")
	{
		window.alert("您尚未填写申请者。");
		f1.applicant.focus();
		return false;
	}

	if (Jtrim(f1.grade.value) == "")
	{
		window.alert("您尚未填写申请者职称。");
		f1.grade.focus();
		return false;
	}

	if (Jtrim(f1.education.value) == "")
	{
		window.alert("您尚未填写申请者学历。");
		f1.education.focus();
		return false;
	}

	if (Jtrim(f1.unit_name.value) == "")
	{
		window.alert("您尚未填写申请者所在单位。");
		f1.unit_name.focus();
		return false;
	}

	if ( ! isValidDate(f1.fill_year.value, f1.fill_month.value, f1.fill_day.value ))
	{
		window.alert("填报日期不合法。");
		f1.fill_year.focus();
		return false;
	}

	if (Jtrim(f1.purport.value) == "")
	{
		window.alert("您尚未填写本课题的研究意义。");
		f1.purport.focus();
		return false;
	}

	if (Jtrim(f1.status.value) == "")
	{
		window.alert("您尚未填写国内外研究现状述评。");
		f1.status.focus();
		return false;
	}

	if (Jtrim(f1.future.value) == "")
	{
		window.alert("您尚未填写预期应用前景。");
		f1.future.focus();
		return false;
	}

	if (Jtrim(f1.point.value) == "")
	{
		window.alert("您尚未填写主要思想、观点。");
		f1.point.focus();
		return false;
	}

	if (Jtrim(f1.analysis.value) == "")
	{
		window.alert("您尚未填写主要内容、重点和难点分析。");
		f1.analysis.focus();
		return false;
	}

	if (Jtrim(f1.way.value) == "")
	{
		window.alert("您尚未填写研究方法。");
		f1.way.focus();
		return false;
	}

	if (Jtrim(f1.moment.value) == "")
	{
		window.alert("您尚未填写阶段及最终预期研究成果。");
		f1.moment.focus();
		return false;
	}

	if (Jtrim(f1.result.value) == "")
	{
		window.alert("您尚未填写预期研究成果。");
		f1.result.focus();
		return false;
	}

	if (Jtrim(f1.outItem1.value) == "")
	{
		window.alert("您尚未填写经费预算。");
		f1.outItem1.focus();
		return false;
	}

	if (Jtrim(f1.reference.value) == "")
	{
		window.alert("您尚未填写本课题前期研究成果,主要的外文参考文献和参考资料。");
		f1.reference.focus();
		return false;
	}

	if (Jtrim(f1.market.value) == "")
	{
		window.alert("您尚未填写应用推广或市场分析。");
		f1.market.focus();
		return false;
	}

	if (Jtrim(f1.commend_mind.value) == "")
	{
		window.alert("您尚未填写推荐单位意见。");
		f1.commend_mind.focus();
		return false;
	}
}

//-->
</SCRIPT>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<div align="center"> 
  <table border="0" cellspacing="0" cellpadding="0" width="650">
    <tr> 
      <td bgcolor="#000099"> 
        <table width="650" border="0" cellspacing="0" cellpadding="0">
          <tr bgcolor="#FFFFFF"> 
            <td colspan="3">&nbsp;</td>
          </tr>
          <tr> 
            <td colspan="3"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td colspan="3">&nbsp;</td>
          </tr>
          <tr> 
            <td width="33%">&nbsp;</td>
            <td bgcolor="#FFFFFF"> 
              <div align="center"><img src="../images/s_item1.gif" width="112" height="22"></div>
            </td>
            <td width="33%">&nbsp;</td>
          </tr>
        </table>
        <table width="650" border="0" cellspacing="1" cellpadding="0" height="120">
          <tr> 
            <td height="179" bgcolor="#FFFFFF"> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td height="5">&nbsp;</td>
                </tr>
              </table>
              <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center" height="151">
                <tr> 
                  <td> 
                    <form name=theform method=post action="s_checkItem.jsp?itemID=<%=itemID%>" onSubmit="return checktheform(this)">
                      <table width="95%" border="0" cellspacing="1" cellpadding="1" align="center">
                        <tr bgcolor="#d9d8dc"> 
                          <td colspan="4">&nbsp;</td>
                        </tr>
                        <tr> 
                          <td width="25%" bgcolor="#d9d8dc" align="center"><font color="#000099">项目名称</font></td>
                          <td colspan="3"> 
                            <input name=item_name size=60 maxlength="60" value="<%=item_name1%>">
                          </td>
                        </tr>
                        <tr> 
                          <td bgcolor="#d9d8dc" align="center" rowspan="2"><font color="#000099">类&nbsp;&nbsp;&nbsp;&nbsp;别</font></td>
                          <td colspan="3"> 
                            <select name=Sort 
                  onChange=JavaScript:showSubOpt(OptSort,this,theform.SubSort) 
                  style="WIDTH: 150px">
                              <option selected 
                    value="">----请选择----</option>
                              <script language=javascript>showMainOpt(OptSort);</script>
                            </select>
                            <font size="2" color="#000099">(可多选,最多两项) </font> 
                          </td>
                        </tr>
                        <tr> 
                          <td width="25%">
                            <select multiple name=SubSort 
                  size=2 style="WIDTH: 150px">
                            </select>
                          </td>
                          <td width="25%" align="center"> 
                            <input name=Input onClick="JavaScript:AddItem('SubSort', 'SelectedIndustry[]', 'Sort')" type=button value="添加>>">
                            <br>
                            <input name=Input2 onClick="JavaScript:DeleteItem('SelectedIndustry[]')" type=button value="<<删除">
                          </td>
                          <td>
                            <select multiple 
                  name=SelectedIndustry[] size=2 style="WIDTH: 150px">
                            </select>
                          </td>
                        </tr>
                        <tr> 
                          <td bgcolor="#d9d8dc" align="center"><font color="#000099">起止年限</font></td>
                          <td colspan="3"> 
                            <input maxlength=4 name=begin_year size=4 value="<%=begin_year%>">
                            <font color="#000099">年</font> 
                            <select name=begin_month>
                              <option value=<%=begin_month%> selected><%=begin_month%></option>
                              <option value=01>01</option>
                              <option 
                    value=02>02</option>
                              <option value=03>03</option>
                              <option 
                    value=04>04</option>
                              <option value=05>05</option>
                              <option 
                    value=06>06</option>
                              <option value=07>07</option>
                              <option 
                    value=08>08</option>
                              <option value=09>09</option>
                              <option 
                    value=10>10</option>
                              <option value=11>11</option>
                              <option 
                    value=12>12</option>
                            </select>
                            <font color="#0000CC">月</font> <font color="#000099">——</font> 
                            <input maxlength=4 name=finish_year size=4 value="<%=finish_year%>">
                            <font color="#000099">年</font> 
                            <select name=finish_month>
                              <option value=<%=finish_month%> selected><%=finish_month%></option>
                              <option value=01>01</option>
                              <option 
                    value=02>02</option>
                              <option value=03>03</option>
                              <option 
                    value=04>04</option>
                              <option value=05>05</option>
                              <option 
                    value=06>06</option>
                              <option value=07>07</option>
                              <option 
                    value=08>08</option>
                              <option value=09>09</option>
                              <option 
                    value=10>10</option>
                              <option value=11>11</option>
                              <option 
                    value=12>12</option>
                            </select>
                            <font color="#000099">月</font> </td>
                        </tr>
                        <tr> 
                          <td bgcolor="#d9d8dc" align="center"><font color="#000099">申 
                            请 者</font></td>
                          <td colspan="3"> 
                            <input name=applicant size="20" maxlength="20" value="<%=applicant1%>">
                            <font color="#000099">(职称)</font> <font color="#000099">
                            <input name=grade size="15" maxlength="20" value="<%=grade1%>">
                            (学历) 
                            <input name=education size="15" maxlength="20" value="<%=education1%>">
                            </font> </td>
                        </tr>
                        <tr> 
                          <td bgcolor="#d9d8dc" align="center"><font color="#000099">所在单位</font></td>
                          <td colspan="3"> 

⌨️ 快捷键说明

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