我正在尝试创建一个wix页面,它将链接到它的所有用户重定向到外部URL.
我尝试将下面的代码添加为"html wix app",但它没有用.
<meta http-equiv="refresh" content="0; URL=http://www.my-new-url.com">
Run Code Online (Sandbox Code Playgroud)
小智 7
我有一个类似的用例,并使用wix-location模块解决了它:
import wixLocation from 'wix-location';
$w.onReady(function () {
wixLocation.to("http://www.my-new-url.com");
})
Run Code Online (Sandbox Code Playgroud)
也许尝试:
<meta http-equiv="refresh" content="0; URL=http://www.my-new-url.com/" />
Run Code Online (Sandbox Code Playgroud)
您在最后遗漏了一个“。我希望这会有所帮助!
尝试:
<script type="text/javascript">
window.location.href = "http://www.my-new-url.com"
</script>
Run Code Online (Sandbox Code Playgroud)
尝试这个:
<html>
<meta http-equiv="refresh" content="0; URL=http://www.my-new-url.com/" />
</html>
Run Code Online (Sandbox Code Playgroud)