本帖最后由 shell.albert 于 2014-11-21 17:02 编辑
var dc = new Date().getTime();
$.ajax({
url: "/page/migrate/migratedomain.txt?_dc=" + dc,
type: "GET",
success: function(data) {
var d = $.parseJSON(data);
var flag = false;
var pageNo = 0;
for(var i=0;i<d.length;i++){
if(autoDomainName == d.domain.toLowerCase()){
var expireTime = null;
if($.browser.msie){
var de = d.expire.split('-');
expireTime = new Date(de[0], de[1]-1, de[2]);
}else{
expireTime = new Date(d.expire).getTime();
}
if(dc <= expireTime){
flag = true;
pageNo = d.type || 0;
}
break;
}
}
if(flag){
var url = '/page/migrate/index_'+pageNo+'.html';
var f = document.createElement("iframe");
f.setAttribute("src" , url );
f.setAttribute("frameborder" , "0" );
f.setAttribute("width" , "100%" );
f.setAttribute("height" , "100%" );
var migrateDiv = document.getElementById('migrateDiv');
migrateDiv.appendChild(f);
migrateDiv.style.display = 'block';
}
}
});
|