-1

例如我有这样的 div

<div id="dvSignup">
// a full working form of asp.net server controls
</div>

我想在 jquery 即兴弹出窗口中显示这个 div。任何示例请不要用于此目的的 iframe。

4

1 回答 1

0

Impromptu 适用于在客户端浏览器上呈现的 jQuery。您应该使用 ajax 将表单数据提交到服务器。以下是代码看看

    var statesdemo = {state0: {
    title: 'Some title for heading',
    html:'some text',
    buttons: { Next: 1 },
    //focus: "input[name='fname']",
    submit:function(e,v,m,f){
    console.log(f);
    e.preventDefault();
    $.prompt.goToState('state1');
    }
    },
    state1: {
    title: 'next title',
    html:'
    <center>
        <textarea name="comments" rows="5" cols="49" style="border-color: #f4f4f4;" placeholder="Enter your requirements..."></textarea>
    </center>',
    buttons: { Back: -1, Done: 1 },
    focus: 1,
    submit:function(e,v,m,f){

    e.preventDefault();
    if(v==1) $.prompt.close();
    if(v==-1) $.prompt.goToState('state0');
    $('#mediaType_other').val(f.comments);
    }
    }
    };

    var ThankYou = {state0: {
    title: '',
    html:'Thank you your quote has been submitted',
    buttons: { Ok: 1 },
    //focus: "input[name='fname']",
    submit:function(e,v,m,f){
    console.log(f);
    if(v==1){ $.prompt.close();
    window.location="http://www.yourweb.com/quote.php";
    }
    }
    }

    };
于 2014-09-29T02:15:46.147 回答