这是我的按钮,我的 jsp 页面中有它
<button type="button" class="btn btn-primary" id="offerPhoneButton" onclick="offerPhone()">Offer Phone</button>
这是我的脚本
<script type="text/javascript">
function offerPhone() {
var phoneDialog = $("#myPhoneList").dialog({
title: 'My Phone',
autoOpen : false,
closeText : 'hide',
show : "fade",
hide : "fade",
modal : true,
width : "400px",
position: { my: "left top", at: "left top", of: window },
open : function() {
alert('hi');
// load doctor_phones.jsp into the phones dialog.
/* $(this).load('pages/doctor/write_prescription.jsp?patient_id=' + patientId + '&patient_name=' + patientName);
this doesn't work, seems to return before the content is actually loaded. */
var content = ajaxGetJQuery("pages/doctor/doctor_phones.jsp");
$("#myPhoneList").dialog("option", "title", "My Phones"); // this is necessary, b/c the title attribute doesn't work.
$(this).html(content);
}
});
$("#myPhoneList").dialog("open");
}
</script>
但是当我单击“提供电话”按钮时,如果您发现我的脚本有任何问题,则不会显示弹出框,请告诉我
最佳答案
关于javascript - 弹出框未显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34461926/