本文介绍了JavaScript - 内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 此主题类似于无法调用WebMthod的主题带参数 [ ^ ]。相关代码如下: var e = document .getElementById(' DropDownRouteID'); var routeById = e.options [e.selectedIndex] .text; var mA = document .getElementById(' MeasureA')。value; var mB = document .getElementById(' MeasureB')。value; $ .ajax({ type:' 获取', url:' SOEDefaultB2.aspx / GetData2', dataType:' text', data: JSON .stringify ({routeById:routeById,mA:mA,mB:mB}), contentType:' application / json ; charset = utf-8', crossDomain: true ,成功:函数(结果){ console .log(' 成功!'); 调试器; ajaxData = results;},错误: function (xhr,status,error){ 调试器; console .log(错误); } }); public static string [] [] GetData2( string route, string mA, string mB){ ...} 错误中的错误:函数显示内部服务器错误。请提示我可以调试错误的位置。非常感谢。解决方案 This thread is similar to the one at Could not call a WebMthod with parameters[^]. The related codes are below:var e = document.getElementById('DropDownRouteID');var routeById = e.options[e.selectedIndex].text;var mA = document.getElementById('MeasureA').value;var mB = document.getElementById('MeasureB').value;$.ajax( { type:'Get', url: 'SOEDefaultB2.aspx/GetData2', dataType: 'text', data: JSON.stringify({routeById: routeById, mA: mA, mB: mB}), contentType: 'application/json; charset=utf-8', crossDomain : true, success:function(results) { console.log('Success!'); debugger; ajaxData = results; }, error: function(xhr, status, error) { debugger; console.log(error); }}); public static string[][] GetData2(string route, string mA, string mB) {... }The error in the error:function shows 'Internal Server Error'. Please hint me where the error can be debugged. Thanks in adavnce. 解决方案 这篇关于JavaScript - 内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的..
09-08 12:53