我必须让用户在登录表单中做出选择。他们可以提交或取消。如果他们点击提交,那么他们会得到这个:
如果他们取消,他们会得到:
我有一个小问题不会打扰我,但会打扰我的主管(这反过来会打扰我 -_-)
如果您注意到确认对话框的弹出窗口中的 [x] 是不合适的,因为它不在 x 框的中心,它在它之外,我不知道为什么会发生这种情况。
这是我的 Jq:
<script>
$(document).on('submit', "#signinform", function(e)
{
e.preventDefault();
var href = '<?php echo base_url();?>studentlogin_controller/agree';
$("#dialog-confirm").dialog(
{
resizable: false,
draggable: false,
height: 310,
width: 500,
modal: true,
buttons:
{
"Cancel": function()
{
$(this).dialog("close");
},
"Enter Queue": function()
{
window.location.href = href;
}
}
});
});
$(document).on('click', "#Cancel", function(e)
{
e.preventDefault();
var href = '<?php echo base_url();?>studentlogin_controller/studentlogin';
$("#dialog-noconfirm").dialog(
{
resizable: false,
draggable: false,
height: 310,
width: 500,
modal: true,
buttons:
{
"Cancel": function()
{
$(this).dialog("close");
},
"Go Back": function()
{
window.location.href = href;
}
}
});
});
</script>
还有我的 HTML:
<div id="dialog-confirm" title="Please Confirm" style="display: none;">
<ul>
<li>By clicking <FONT COLOR="red">"Enter Queue"</FONT> counselors will be notified that you here - please take a seat</li>
<br>
<li>If You click <FONT COLOR="red">"Cancel"</FONT> you will not be inserted into the Student Queue</li>
</ul>
</div>
<div id="dialog-noconfirm" title="Please Confirm" style="display: none;">
<ul>
<li>By clicking <FONT COLOR="red">"Go Back"</FONT> your information will be removed from the current session</li>
<br>
<li>If You click <FONT COLOR="red">"Cancel"</FONT> your information will still be active and you will stay on the current page</li>
</ul>
</div>
这是我的主题包括和 CSS :
<link rel="stylesheet" href="<?php echo base_url(); ?>css/mainstyle.css" type="text/css" />
<link rel="stylesheet" href="<?php echo base_url(); ?>css/secondarystyles.css" type="text/css"/>
<link rel="stylesheet" href="<?php echo base_url(); ?>javascript/themes/smoothness/jquery-ui-1.8.4.custom.css"/>
<script src="<?php echo base_url(); ?>javascript/js/jquery.js" type="text/javascript"></script>
<script src="<?php echo base_url(); ?>javascript/js/jquery-ui-1.10.2.custom.js" type="text/javascript"></script>
这发生在谷歌浏览器中。