+ 1
Please anyone find error in this code?
<html> <head> </head> <body onload="redirect()"> <script type="text/javascript"> function redirect() { if (screen.width <= 950) { window.location = "https://www.google.com/"; } </script> bbshd </body> </html>
4 Answers
+ 4
here's the updated version!
https://code.sololearn.com/WiEfJ5E99QLN/?ref=app
+ 1
thank you philip
0
Hmmm...
0
Apparently libe 5 and 9 give the error. Should be the way you use them.
Try replacing onload with window.onload in the script