<script language="javascript">
<!--
function logout()
<script language="javascript">
<!--
function logout(){
alert("你确定要注销身份吗?");
window.location.href="logout.asp?act=logout"
}
-->
</script>
<script language="javascript">
function Del()
{
if (confirm("你确定要删除吗?"))
{
window.open("otherfile.asp","top","width=640,height=400")
}
}
</script>
<!-- function logout()
{
if (confirm("你确定要注销身份吗?是-选择确定,否-选择取消"))
window.location.href="logout.asp?act=logout"
}
}
-->
</script>
if (confirm("你确定要注销身份吗?是-选择确定,否-选择取消"))
window.location.href="logout.asp?act=logout"
}
}
-->
</script> =====javascript中弹出提示框跳转到其他页面=====
<script language="javascript">
<!-- function logout(){
alert("你确定要注销身份吗?");
window.location.href="logout.asp?act=logout"
}
-->
</script>=====Html中确认后弹出新页面===========
<script language="javascript">
function Del() {
if (confirm("你确定要删除吗?"))
{
window.open("otherfile.asp","top","width=640,height=400")
}
}
</script>

本文介绍了如何使用JavaScript中的`alert`和`confirm`函数来实现网页上的提示及确认操作,并展示了如何根据用户的确认结果执行页面跳转或者打开新页面的功能。
334

被折叠的 条评论
为什么被折叠?



