I'm using jQuery's .load()
method to retrieve some data when a user clicks on a button.
After the load successfully finishes, I show the result in a <div>
.
The problem is, sometimes an error occurs in load()
while retrieving the data.
How can I catch an error in load()
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…