點擊刪除是彈出確認刪除對話框


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title>網頁標題</title>
    <meta name="keywords" content="關鍵字列表" />
    <meta name="description" content="網頁描述" />
    <link rel="stylesheet" type="text/css" href="" />
    <style type="text/css"></style>
    <script type="text/javascript">
    function shanchu(id){
        if (window.confirm ("你確定真的要刪除嗎")){
            alert(id+"已經被刪除");
        }else{
            alert("么么噠(づ ̄ 3 ̄)づ");}
    }
    
    </script>
</head>
<body align=center>
<table border=1 width=500 align=center>
<tr>
    <td>編號</td>
    <td>新聞</td>
    <td>操作</td>
</tr>
<tr>
    <td>1001</td>
    <td>武漢傳智PHP2016年3月25號開班</td>
    <td><button  onclick="shanchu(1001)">刪除</button><button>修改</button></td>
</tr>
<tr>
    <td>1002</td>
    <td>深圳傳智PHP2016年9月30號開班</td>
    <td><button onclick="shanchu(1002)">刪除</button><button>修改</button></td>
</tr>
</table>
</body>
</html>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM