<html>
<head>
<title>a</title>
<script>
function confirmWindow()
{
return window.confirm("你确定要打开此窗口吗?");
}
</script>
</head><body>
<a href="b.html" onClick="return confirmWindow()">打开窗口</a>
</body>
</html>
在我的机子上,点取消后还会打开链接,而在我们学校的机房里却不会,为什么?
<head>
<title>a</title>
<script>
function confirmWindow()
{
return window.confirm("你确定要打开此窗口吗?");
}
</script>
</head><body>
<a href="b.html" onClick="return confirmWindow()">打开窗口</a>
</body>
</html>
在我的机子上,点取消后还会打开链接,而在我们学校的机房里却不会,为什么?
解决方案 »
- 如何动态组建json
- 在线请教。怎样让三张图片交替显示
- js 如何设置页面位置?(新手)
- 预览功能如何实现???
- 文本框长度必须是3位,例如001,直接输入1就报错。文本框怎么默认自动显示当前年份,例如 2006?
- onclick="JavaScript:this.disabled=true" 在netscape 下应该怎么写? ----
- 关联的下拉框的代码!
- NETSCAPE6中可以操作DIV吗?
- 求救,在网页中怎样解决print screen键的屏蔽问题。可能有点难。
- 前端框架好多,赶脚十分纠结,学哪个好呢?
- location.href的写法!!!!
- 请教关于fileupload控件的赋值
<head >
<title >a </title >
<script >
function confirmWindow()
{
if(window.confirm("你确定要打开此窗口吗?"))
{
document.location.href='b.html'
}
return
}
</script >
</head > <body >
<a href="#" onClick="confirmWindow()" >打开窗口 </a >
</body >
</html >
<html >
<head >
<title >a </title >
<script >
function confirmWindow()
{
if(window.confirm("你确定要打开此窗口吗?"))
{
document.location.href='b.html'
}
}
</script >
</head > <body >
<a href="#" onClick="confirmWindow()" >打开窗口 </a >
</body >
</html >