用confirm,看看这个
[CODE]<html>
<head>
<script language=javascript>
function aaaa()
{
var result=confirm("are you sure?");
if(result)
document.all.btn1.value="you choiced Yes";
else
document.all.btn1.value="you choiced No";
}
</script>
</head>
<body>
<div id=div1><input id=btn1 type=button onclick="aaaa();" value="clickme">
</div>
</body>
</html>[/CODE]