javascript - PopupCenter 打开的按钮不回发
问题描述
您好我使用了来自 neofnd/popupCenter的Popupcenter 功能来打开aspx 页面。aspx 页面已打开,但 aspx 页面中的按钮不会触发,也不会回发。有人告诉我如何解决它。提前致谢。
有来自github的代码
function PopupCenter(url, title, w, h) {
// Fixes dual-screen position Most browsers Firefox
var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left;
var dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top;
width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
var left = ((width / 2) - (w / 2)) + dualScreenLeft;
var top = ((height / 2) - (h / 2)) + dualScreenTop;
var newWindow = window.open(url, title, 'scrollbars=yes, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
// Puts focus on the newWindow
if (window.focus) {
newWindow.focus();
}
}
有我的按钮打开调用这个功能。
解决方案
推荐阅读
- c# - Button 包含 DataContext 命令时如何显示新窗口
- html - 使用 SASS mixin 时 CSS 编译错误
- javascript - 即使在页面的每个部分都锚链接速度
- codeigniter - Codeigniter 分页 URL 以 ?page=1 开头,依此类推
- python - 应用策略设计模式
- ng-bootstrap - ng bootstrap "^4.0.0":当分页控件本身工作时,它们的定位被破坏
- c++ - C++ 集合不排序
- css - 在单击时使用变换比例
- .net - Clone a GIT repository with NGit in VB.net
- jmeter - 我将如何使用 Java 代码从 Jmeter API 使用 BackendListenerClient,如 GraphiteBackendListenerClient 和 InfluxdbBackendListenerClient?