2.6 确认用户选择

<script>
    if (confirm("同意以上条款")) {
        document.write("同意")
    } else  {
        document.write("拒绝");
    }
</script>