jQuery前端框架easyui使用Dialog时bug处理

2020-05-22 17:04:27易采站长站整理


    <input type=”button” value=”确认预约” id=”btnconfirm” onclick=”javascript:openconfirmDlg();” />
    <div id=”confirmd”> 
        <p>请选择确认结果:</p>
        <p><input type=”radio” value=”True” id=”rtrue” name=”rresult” class=”rresult” /><label for=”rtrue”>成功</label>
             
        <input type=”radio” value=”False” id=”rfalse” name=”rresult” class=”rresult” /><label for=”rfalse”>失败</label></p>
    </div>
     <script type=”text/javascript”>
         $(“#confirmd”).dialog({
             title: ‘预约确认’,
             iconCls: ‘icon-save’, resizable: false, modal: true, closed: true,
             width: 200, height: 200,
             buttons: [{ text: ‘提 交’, handler: function () {
                 alert(“ok”);
             }
             }, { text: ‘取 消’, handler: function () {
                 $(“#confirmd”).dialog(“close”);
             }
             }]         });
     window.onscroll = function () {
         $(“#confirmd”).dialog(“move”, { top: $(document).scrollTop() + ($(window).height() – 200) * 0.5 });
     }
     function openconfirmDlg() {
         $(“#confirmd”).dialog(“open”);
         $(“#confirmd”).dialog(“move”, { top: $(document).scrollTop() + ($(window).height() – 200) * 0.5 });
         $(“.window-mask”).css({ height: $(document).height()});