在确认框中重定向到另一个页面

时间:2016-12-04 18:31:10

标签: javascript html

如果我想在点击“确定”后将某人发送到另一个页面(使用antoher链接),该怎么办?感谢。

<!DOCTYPE html>
<html>
<head></head>
<body>
<script type = text/javascript>

var result = confirm("Do you really want to leave this page?");
if (result == true) {
//Here somehow I should put the link
}

 else {}

<script>
</body>
</html>

0 个答案:

没有答案
相关问题