根据对象,返回'&键名=值&键名=值‘形式

 Object.prototype.srcCode=function () {
        var str='';
        for(key in this){
            if (this.hasOwnProperty(key) === true){
                str+="&"+item+"="+this[item]
            }
        };
        return str;
    }

  

猜你喜欢

转载自www.cnblogs.com/holy-amy/p/9133973.html