我试图创建一个提示框,提示用户是否删除或取消,当我点击删除按钮它工作正常,但当我再次点击取消我的网页是关闭的。下面是封闭的功能。请帮忙。JavaScript删除或取消
<SCRIPT language="JavaScript">
<!--
function go_there()
{
var where_to= confirm("Do you really want to go to this page??");
if (where_to== true)
{
//closes the page
}
else
{
//Cancel the page and do not close the page
}
}
//-->
</SCRIPT>
您可以发布被点击时取消执行的代码。 else部分中的代码。 – rahul 2009-08-13 05:37:57
嘿,如果我的解决方案为你工作,你可以把它标记为接受答案。 – Saeros 2009-08-22 05:25:16