<html> |
<head> |
<title>confirm</title> |
<script type= "text/javascript" > |
function disp_confirm() |
{ |
var r=confirm( "请选择确认或者取消" ); |
if (r== true ) |
{ |
alert( "您选择了确认" ); |
} |
else |
{ |
alert( "您选择了取消" ); |
} |
} |
</script> |
</head> |
<body> |
<input type= "button" onClick= "disp_confirm()" value= "单击这里" /> |
</body> |
</html> |