首页 > 代码库 > jquery使用dialog调用弹出框

jquery使用dialog调用弹出框

1、jquery可以调用弹出框,语法如下:

  $.dialog("open",
        {
      id:‘dialog‘,
            name : ‘create-guide‘,
            title : ‘创建结果:‘,
            html : $(‘#review-result‘).html(),
            width : 460,
            frameScrolling : ‘no‘,
         close:function(){
       if(dataArray[1] == 0){
        
       }else {
        window.location.href = "http://www.mamicode.com/${ctx}/web/form/order/build-order.do";
        //document.ec.submit();
       }
       $("#errorBody").html(‘‘);
         }
        });

 

<script type="text/dialog" id="review-result">
<div class="inborder">
    <h3 class="reviewFailure" color="red">创建失败(<span id="failCount"></span>)</h3>
    <table class="list-grid list-grid-highlight">
        <thead>
            <tr>
                <th width="120px">
                    <label>申请编号</label>
                </th>
                <th>
                    <label>原因</label>
                </th>
            </tr>
        </thead>
        <tbody id="errorBody" >
           
        </tbody>
    </table>
    <h3 class="reviewSuccess">创建成功(<span id="successCount"></span>)</h3>
 <h3 class="reviewSuccess">签收单号:<span id="orderNo"></span></h3>
</div>
</script>

 

调用close方法,当dialog调出的弹出业关闭时调用执行的操作。

jquery使用dialog调用弹出框