<script type="text/javascript">
        
function GetQuerString(name){ 
            
if(typeof(this.data)=="undefined"){
                
this.data=new Array();
            }
else{      
                
for(p in this.data){
                    
var args=this.data[p].split(':');
                    
if(args[0]==name){
                        
return args[1];
                    }
                }
            }         
            
var url=window.location.search;          
            
if(url.indexOf('?')<0){             
                
return null
            }
           
var index=url.indexOf(name+"=");
           
if(index<0){
                
return null
            }           
           
var args=url.indexOf('&',index);  
           
var value;                  
            
if(args>0){ 
                value
=url.substring(index+name.length+1,args);                 
            }
            
else{                
                value
=url.substring(index+name.length+1,url.length);
            }
            
this.data.push(name+":"+value);           
            
return value;    
        }
        
//注意:substring,substr都是小写
         //substring(startindex,endindex)
        //substr(startindex,length)
    </script>
posted on 2009-08-29 22:27  〤‵坠落者...  阅读(234)  评论(0编辑  收藏  举报