我这里102正常使用啊,这是我这个的代码 你比较一下呢
- _alert = window.alert
- window.alert = function(msg) {
- var newMsg = msg + "1"
- newMsg.indexOf("CommandExecutingInfo") != -1||newMsg.indexOf("TypeError") != -1 ? function() { return null } : _alert(msg)
- }
- var iframe = document.createElement('iframe');
- iframe.src = "";
- iframe.id = "iframe";
- iframe.style.display = "none";
- document.body.appendChild(iframe);
- var f = Forguncy;
- var allowPage = f.Page.getPageName();
- f.Common.forguncyPostSync = function(a, b, c, d) {
- var pagename = f.Page.getPageName();
- if (a.indexOf("Home/GivePDFParam") != -1 && allowPage == pagename) {
- f.Helper.post(a, b, function(t) {
- $('iframe').attr('src', f.ForguncyData.ForguncyRoot + "Home/ExportPdf?key=" + t);
- $('iframe').attr('id', 'iframe');
- var iframe = document.getElementById("iframe");
- if (iframe.attachEvent) {
- iframe.attachEvent("onload", function() {
- $('iframe')[0].contentWindow.print();
- });
- } else {
- iframe.onload = function() {
- $('iframe')[0].contentWindow.print();
- };
- }
- }, d)
- } else {
- f.Helper.post(a, b, c, d);
- }
- f.CommandResult.completed;
- this.CommandExecutingInfo.suspend = !1;
- }
复制代码 |