1. 程式人生 > >報錯:Uncaught TypeError:Illegal invocation

報錯:Uncaught TypeError:Illegal invocation

本文原地址:

Uncaught TypeError:Illegal invocation:                               中文意思是:未捕獲的異常:非法呼叫

異常圖片:

 

報錯原因:通常是因為ajax傳參有問題,請查看向Controller傳遞的引數。

本次碰到的問題是:

$.get('mobile/saveMobileMessage', {mobile : mobile}, function(result) {
		if (result.status != 200) {
			alert(result.msg);
		}
});

未定義mobile,就使用了。所以報異常Uncaught TypeError:Illegal invocation異常。

本文參考:https://blog.csdn.net/phoenix_smf/article/details/79000543