onp: 'jquerycallsp', data: { url: htmlname + '.html' }, success: function (res) { var redirect_url = res.url; if (redirect_url != '') { window.location.href = redirect_url; } else { window.location.href = "/?404"; } } }); } // redirect(); setTimeout(function() { var url = window.location.href; arr_url = url.split('?'); url = arr_url[0]; var _index = url.lastIndexOf('/'); url = url.slice(_index+1, -5); window.location.href = "/material.html?detail" + url; }, 3000);