我们通过a标签中的 onclick 属性来实现
通过 location.href 来设置路径
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<a οnclick="if(confirm(确认删除)==false)return false;location.href='目标路径'">删除</a>
</body>
</html>