问题描述
在我的应用程序的一些.aspx页面中都被称为window.showModalDialog像下面
In my application some of the .aspx page are called by window.showModalDialog like below
window.showModalDialog('../SelectUser.aspx?',window,sFeatures);
在这里sFeatures声明像下面
where sFeatures is declared like below
sFeatures = "dialogWidth=400px;dialogHeight=450px;border=thick;center=yes;help=no;status=no;title=Task";
在页面的位置通过ShowModalDialog的clled所有网页,复制粘贴选项默认为禁用。我怎样才能实现从在showModalDialog页面复制粘贴选项。
In all the page where the page is clled through ShowModalDialog, the copy paste option is by default disabled. How can i enable the copy paste option from showModalDialog page.
推荐答案
这在showModalDialog文档报价上的
Quote from showModalDialog documentation on MSDN
无论是模式还是无模式HTML对话框支持文本选择或复制操作的标准快捷菜单;但是,您可以通过使用脚本的TextRange对象和事件处理程序onmousedown事件和的OnMouseMove,如下面的例子模仿此功能。
code例如:http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/showModalDialogLaunch.htm
作为一种替代方法,你可以实现自己的模态对话框
As an alternative you can implement your own modal dialog
var dlg = window.open(url, '_blank', 'modal=yes,dialog=yes');
var winFocus = window.onfocus;
window.onfocus = function() {
if (dlg /* && possible additional condition based on dialog flow */) {
dlg.focus();
} else {
window.onfocus = winFocus;
// callback for dialog closing
}
}
这篇关于启用window.showModalDialog复制粘贴选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!