码迷,mamicode.com
首页 > 其他好文 > 详细

location

时间:2015-07-29 19:08:56      阅读:89      评论:0      收藏:0      [点我收藏+]

标签:

var Loc = function (host, path) {
this.host = host;
this.path = path;
this.getUrl();
};

Loc.prototype.getUrl = function () {
this.url = ‘http://‘ + this.host + ‘/‘ + this.path;
return this.url;
};

var createLoc = function (host, path) {

if (arguments.length === 1)
{

}
else {
return new Loc(host, path);
}
};

location

标签:

原文地址:http://www.cnblogs.com/yfann/p/4686561.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!