Pārlūkot izejas kodu

命名空间未定义问题,js报错问题

lihai 6 gadi atpakaļ
vecāks
revīzija
c8b539028f

+ 2 - 1
Web/_common/scripts/Global.js

@@ -206,7 +206,8 @@ var ERROR_NONE = 1;
206 206
 var ERROR_CONTINUE = 2;
207 207
 
208 208
 var GlobalAllowDrag = false;
209
-function document.ondragstart()
209
+//function document.ondragstart()
210
+document.ondragstart = function ()
210 211
 {
211 212
     event.returnValue = GlobalAllowDrag;
212 213
 }

+ 2 - 1
Web/_framepage/leftframe.aspx

@@ -144,7 +144,8 @@
144 144
             }
145 145
         }
146 146
 
147
-        function window.onload() {
147
+        //function window.onload() {
148
+         window.onload = function () {
148 149
             crmWonderBar.attachEvent("onbeforeswitch", hideCurrentNavBar);
149 150
         }
150 151
 

+ 3 - 1
Web/_javascripts/globalctrl.js

@@ -1,10 +1,12 @@
1
-function document.onkeypress() {
1
+//function document.onkeypress() {
2
+document.onkeypress = function () {
2 3
     var event = window.event;
3 4
     if (event.ctrlKey && event.keyCode == 80) {
4 5
         event.keyCode = 0;
5 6
         return false;
6 7
     }
7 8
 }
9
+
8 10
 document.onkeydown = document.onkeypress;
9 11
 
10 12
 //function window.onerror() {

+ 2 - 1
Web/web.config

@@ -77,7 +77,7 @@
77 77
       </controls>
78 78
     </pages>
79 79
     <httpHandlers>
80
-      <add path="ajaxpro/*.ashx" verb="POST,GET" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/>
80
+      <add path="ajaxpro/*.ashx" verb="POST,GET" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2"/>
81 81
       <remove verb="*" path="*.asmx"/>
82 82
       <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
83 83
       <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
@@ -120,6 +120,7 @@
120 120
       <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
121 121
       <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
122 122
       <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
123
+      <add name="ajaxpro" verb="*" path="*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2"/>
123 124
     </handlers>
124 125
     <defaultDocument>
125 126
       <files>