JavaScript try-catch语句(错误处理) try { //可能会导致错误的代码 } catch (error) { //在错误发生时怎么处理 } 链接:https://www.cnblogs.com/iceflorence/p/6593139.html