-3
A
回答
2
<script>
alert(123);
// go to whereever you want
window.location.replace('http://stackoverflow.com');
</script>
alert
挡住,所以直到您单击确定继续执行代码的等待。
0
当用户按下“好”,所以把下面的代码你alert()
功能后,您alert()
功能后,该代码就会被执行:
window.location.href = '...';
这将改变用户的窗口的位置去...
用URI替换...
。您也可以拨打window.location.replace()
函数。
-1
您更好地使用一个比确认警报:
if (confirm('go to stackoverflow?'))
{
window.location.replace('http://stackoverflow.com');
}
else
{
// Clicked no
}
相关问题
- 1. CakePHP的链接警报
- 2. 添加链接从网页到灯箱
- 3. 如何灯箱添加网页链接
- 4. iphone移动网络定制警报箱
- 5. 点击链接去不了网页
- 6. 过去的报警触发
- 7. 如何在JScript警报对话框中放置指向网页的链接?
- 8. 显示超链接的警报
- 9. 永久链接去404页
- 10. 检测链接点击去外部网址,并显示“警告”
- 11. 警报在嵌入式网页视图
- 12. 我如何从这个链接的网页刮去子标题?
- 13. 链接去不同的网址
- 14. svg中的网页链接
- 15. 规范的网页链接
- 16. 格式的网页链接
- 17. 报警接收器多个报警
- 18. 接近警报误报
- 19. 网站的链接,从我的网页
- 20. 警报箱,CountDownTimer,后退按钮崩溃
- 21. 错误在Android中创建警报箱
- 22. jQuery警报箱固定位置问题?
- 23. 单页中的Birt超链接报表
- 24. 刮去网站链接 - 看不到href
- 25. PHP去链接
- 26. 分页笨:网页,错误的链接
- 27. 如何从asp.net网页链接到ssrs报告
- 28. 单页网站和链接
- 29. 链接网页域名
- 30. AS3链接到网页