问题很简单,我需要在SetTimeout中插入var,以便在重定向到url之后,但问题是从var中取值redir:
<script>
/// Var for redirect
var redir="action";
/// Set Time for redirect with the until var inside url
setTimeout("location.href='?action=cp&load='+action",1500);
</script>
Run Code Online (Sandbox Code Playgroud)
问题对我来说是引号,因为我已经为SetTimeout设置了这些引号并且为了放置var redir的值我不知道究竟放在哪里
谢谢