未捕获的TypeError: Cannot read property '零

Uncaught TypeError: Cannot read property 'paypal_form' of null

本文关键字:property read Cannot TypeError      更新时间:2023-09-26

所以我在我的网站上得到以下错误:

Uncaught TypeError: Cannot read property 'paypal_form' of null

下面是问题部分:

success:function(data){
            if(typeof(data.paypal_form)!=null)
            {
谁能告诉我如何修复这个输入错误?

试试这个

success:function(data){
if(!data)
{
console.log("data is null");
return;
}
if(!data.paypal_form)
{
console.log("data.paypal_form is null");
return;
}
if(typeof(data.paypal_form)!=null)
{