我不太习惯使用 jquery 对话框之类的东西。
所以这是一个新手问题。
此时,我正在使用提示来获取 SharePoint 中用户的回复。
var answer = dialog("Type the text you want to display in the email.");
但我的投入是有限的。
谁能帮我?
添加。
我现在可以插入我的对话框了。但我无法显示它。
这就是我插入它的方式:
if ($("#dialogSendMail").length) {
}
else {
$("#DeltaPlaceHolderUtilityContent").after("<div id='dialogSendMail' title='Enter mail body'> <label for='mailBody'>Type the text you want to display in the email:</label><p><input type='text' id='mailBody' name='mailBody'></p></div>");
}
这就是我尝试显示它的方式:
var answer ="";
$( "#dialogSendMail" ).dialog({
resizable: false,
height:350,
width:650,
modal: true,
autoOpen : false,
buttons: [
{
text: "Send Mail",
click: $.noop,
type: "submit",
form: "myForm"
},
{
text: "Close",
click: function () {
$(this).dialog("close");
}
}
]
});
但是当我运行我的代码时,它不显示该对话框。
此外,我正在尝试找到一种从文本框获取响应的方法。
谁能帮我?