学习总结
给SELECT 添加选择项
 jQuery(function () {
              for(var j=1;j<=12;j++)
                jQuery("#SelectMonth").append("<option value='"+j+"'>"+j+"</option>");
            });
选择 根据ID和值选中某一项
jQuery("#SelectYear option[value='"+year1[0]+"']").attr("selected",true) ;

ajx
 var xmlHttpReq = null;
        if (window.XMLHttpRequest){
          xmlHttpReq = new XMLHttpRequest();
        }
        else if (window.ActiveXObject){
           xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
        }
        if(xmlHttpReq != null)
        { 
            xmlHttpReq.open("get","../MainItemHandler.ashx?year='"+syear+"'&month='"+smonth+"'&projectId="+projectid,true);
            xmlHttpReq.onreadystatechange=function ()
            {
               
              if(xmlHttpReq.readyState == 4)
               {
                if(xmlHttpReq.status==200)
                {
      
                  var result=xmlHttpReq.responseText;
                  if(result=="true")
                    {
                   
                      alert("该月份已经填过月报");
                      return;
                    }
                }
               }
            }
            xmlHttpReq.send(null);
       }

相关文章:

  • 2022-12-23
  • 2021-04-08
  • 2021-08-03
  • 2021-05-22
  • 2021-05-19
  • 2021-09-01
  • 2022-12-23
  • 2021-10-02
猜你喜欢
  • 2021-11-20
  • 2021-08-20
  • 2021-07-25
  • 2022-03-02
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案