Home >php教程 >php手册 >求改写剔除验证 确认删除吗

求改写剔除验证 确认删除吗

WBOY
WBOYOriginal
2016-06-06 19:41:241283browse

求改写删除验证 确认删除吗 代码是 ahref='javascript:;'onclick="showWindow('xinxi', 'index.php?act=deleteid={$my['id']}','get',0);returnfalse;"删除/a 在这段信息中加上return('确认删除吗?')也不能执行询问或者询问了点否还是执行了删除 求怎么加个判

求改写删除验证 确认删除吗
代码是 

<br />
<a href='javascript:;' onclick="showWindow('xinxi', <br />
'index.php?&act=delete&id={$my['id']}','get',0);return false;">删除</a><br />


在这段信息中  加上 return('确认删除吗?')  也不能执行询问 或者询问了点否还是执行了删除

求怎么加个判断 点否 则不删除
------解决思路----------------------
<br />
<script type="text/javascript"><br />
function del(id){<br />
    if(confirm('是否删除')==true){<br />
        showWindow('xinxi', 'index.php?&act=delete&id='+id,'get',0);<br />
    }else{<br />
        return ;<br />
    }<br />
}<br />
</script><br />
<a href="javascript:;" onclick="del({$my['id']})">删除</a><br />
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn