0

如何显示带有表单信息的确认模式对话框,以便用户可以确认他们在表单中选择的内容,并且只有在用户这样说的情况下才提交?

confirm.$("#submit-button").click( function(){
    if (validator.form()==true) {
        tb_show("Countdown", "are_you_sure.html?height=100&width=200&modal=true", "");
    //some check here maybe?    
    }
    return false;
});
4

1 回答 1

0

tb_show 可以显示一个隐藏的 DIV,所以最好的方法是用您希望用户确认的内容填充该 div,然后简单地显示它。DIV 可以保持一个“是”按钮,单击该按钮执行实际提交

<script>
$('#confirmDiv').html("Are you sure you want to...");
tb_show("Countdown", "#TB_inline?height=100&width=200&inlineId=confirmDiv");
...

<body>
...
<div id='confirmDiv' style='display:none'></div>
于 2009-03-28T04:21:52.437 回答