how to check the script element load event accross browser without jquery

后端 未结 3 820
北海茫月
北海茫月 2020-12-12 02:24

I have to do the cross-domain ajax,so I try the jsonp.

Then I will have to add the script element dynamiclly to the page,however I can not check its sta

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 03:02

    Looking at yepnope.js it uses both onload and onreadystatechange but it also uses a timeout loop to check the readystate property of the script element, see here.

提交回复
热议问题