能否在登陆成功后自动跳转到首页或者user.php页?
能否在登陆成功后自动跳转到首页或者user.php页?如何实现? <meta http-equiv="refresh" content="0;URL={$message.href}" />
0秒跳转到{$message.href} [code]
<td id="redirectionMsg">
如果您不做出选择,将在 <span id="spanSeconds">3</span> 秒后跳转到第一个链接地址。 </td>
<script language="JavaScript">
<!--
var seconds = 3;
var defaultUrl = "/"; //缺省跳转URL地址
onload = function()
{
if (defaultUrl == 'javascript:history.go(-1)' && window.history.length == 0)
{
document.getElementById('redirectionMsg').innerHTML = '';
return;
}
window.setInterval(redirection, 1000);
}
function redirection()
{
if (seconds <= 0)
{
window.clearInterval();
return;
}
seconds --;
document.getElementById('spanSeconds').innerHTML = seconds;
if (seconds == 0)
{
window.clearInterval();
location.href = defaultUrl;
}
}
//-->
</script>
[/code]
官方的后台跳转代码,改下那个缺省URL地址也可以用用。 具体哪个文件,哪个地方,修改成哪样?可以再详细一点吗? message.dwt模板 感谢分享!
页:
[1]
