0

When runned on safari,”getElementById” can’t work.

How can I solve this? :(

5th Jun 2019, 4:26 AM
jealous
jealous - avatar
6 ответов
+ 3
This is an error that occurs in Safari when you read a property or call a method on a null object. ... One way this error might occur in a real world example is if you try using a DOM element in your JavaScript before the element is loaded. Can you post your code so I can have a look?
5th Jun 2019, 5:00 AM
River
River - avatar
+ 2
I take it you have fixed it now? Working fine for me. If not, try wrapping your JS in the window.onload function or <script> tags 😁
5th Jun 2019, 6:23 AM
River
River - avatar
+ 2
You're welcome, bud
5th Jun 2019, 9:11 AM
River
River - avatar
0
Error massage is like this. TypeError: null is not an object (evaluating 'something.style') Line: 37
5th Jun 2019, 4:29 AM
jealous
jealous - avatar
0
https://code.sololearn.com/WOzNsPaDYMUg/?ref=app this is it,s URL. thanks a lot.
5th Jun 2019, 6:20 AM
jealous
jealous - avatar
0
by using <script> tag, it worked well. Thank you very much!!
5th Jun 2019, 8:44 AM
jealous
jealous - avatar