ECShop 网上商店系统支持论坛's Archiver

lictor 发表于 2007-11-15 09:16

能否在登陆成功后自动跳转到首页或者user.php页?

能否在登陆成功后自动跳转到首页或者user.php页?

如何实现?

xushuyi 发表于 2007-11-15 10:34

<meta http-equiv="refresh" content="0;URL={$message.href}" />

0秒跳转到{$message.href}

xushuyi 发表于 2007-11-15 10:48

[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地址也可以用用。

cnave 发表于 2007-11-15 14:15

具体哪个文件,哪个地方,修改成哪样?可以再详细一点吗?

xushuyi 发表于 2007-11-15 18:14

message.dwt模板

FreeRxs 发表于 2008-10-2 12:03

感谢分享!

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.