Mysterious 'object doesnt support this method'error in IE8 on google.load

后端 未结 3 1701
太阳男子
太阳男子 2020-12-21 18:29

i am using google search JSAPI in my local search app. Everything works fine in all the browsers except IE 8. The problem is after the specific line of code my jquery base o

3条回答
  •  执笔经年
    2020-12-21 19:06

    This problem is caused by document.write in Google's load API, similar to this question. The script is deferred, as seen in the picture below:

    enter image description here

    To solve the issue, do not wrap the code in an onload/domready handler.

    
    
    

    Note that JSfiddle places any content at the upperleft corner within the tags. So, a simple copy-paste of the code in JSFiddle will not show the right results.

提交回复
热议问题