jQuery jQuery.readyException() 方法

jQuery 教程 · 2019-03-29 14:17:03

实例

传递接受到的错误给 console.error

jQuery.readyException = function( error ) { console.error( error ); };

定义和用法

$.readyException() 函数处理包裹在jQuery()中函数同步抛出的错误。


注意:1. 当包裹在jQuery()或jQuery( document ).ready(),或等效的函数中的函数同步抛出错误的时候,这个方法就会被触发。默认情况下,它超时抛出错误以便它被记录在控制台中,并传递给window.onerror。

语法

$.readyException( error )

参数 描述
error Error类型 包裹在jQuery()中函数抛出的一个错误

点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html

查看所有标签

Don't Make Me Think

Don't Make Me Think

Steve Krug / New Riders Press / 18 August, 2005 / $35.00

Five years and more than 100,000 copies after it was first published, it's hard to imagine anyone working in Web design who hasn't read Steve Krug's "instant classic" on Web usability, but people are ......一起来看看 《Don't Make Me Think》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具