使用JS:(在<head>
标签中)
<script>window.location="https://stackoverflow.com";</script>
使用 PHP:(在 <head>
标签中)
header('Location: https://stackoverflow.com');
end();
我应该使用哪一个?还是其他的?
另外,使用<meta>
标签如何?
<meta http-equiv="refresh" content="0;url=https://stackoverflow.com"/>
有很多好的答案,我不知道要接受哪个答案,非常感谢。
<meta>
标签怎么样?@adeneo - l2aelba