工作的一些总结记录
学习总结
给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);
       }
 
                    
                     
                    
                 
                    
                
 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号