我正在研究遗留应用程序,并将jquery从1.6.2升级到1.9.1 我使用migrate.js来解析已弃用的代码。
<script src="@Url.Content("~/Scripts/jquery-1.9.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-migrate-1.2.1.min.js")" type="text/javascript"></script>
以下javscript会弹出一个对话框;
jQuery.fn.jDialogWrapper("Please enter the worked hours(should not be zero), for the entered the Contract Number or Description.").dialog('open');
其中函数定义如下;
jQuery.fn.jDialogWrapper = function (message) {
return $('<div class="StasDialogClass"></div>')
.html(message)
.dialog({
autoOpen: false,
dialogClass: 'StasDialogClass',
modal: true,
resizable: false,
title: 'Mulalley STAS',
buttons: {
OK: function () {
$(this).dialog('close');
}
}
});
};
当禁用对话框消息时,“确定”按钮中没有文本。应该说好的。 我该如何解决这个问题?