0

Getting Uncaught TypeError: Cannot set property of 'onfocus' of null line: 11

I don't know why I'm getting this error at first i thought there's some issue with my id but it's not. All code looks perfect. Need help! https://code.sololearn.com/WkC8nkvV89BD/?ref=app

19th Aug 2020, 8:57 AM
Pawan
Pawan - avatar
8 Respostas
+ 2
https://code.sololearn.com/WeS3250M06dF/?ref=app
19th Aug 2020, 2:19 PM
v@msi😉
v@msi😉 - avatar
+ 3
Try this-: window.onload=( )=>{ // Your code }
19th Aug 2020, 9:01 AM
Akash Agrawal
Akash Agrawal - avatar
+ 3
codingIsL💗ve if you code are not work So try this. This is definitely work window.onload = function(){ // Your code } // I know you are new in js but you learn for your mistakes
19th Aug 2020, 2:49 PM
Akash Agrawal
Akash Agrawal - avatar
+ 2
Have you tried what Akash Agrawal said, it works fine. Put your js code in that
19th Aug 2020, 9:20 AM
v@msi😉
v@msi😉 - avatar
+ 1
It works, Write your js in window.onload = () => { //here } //it's about type error
19th Aug 2020, 9:24 AM
Jayakrishna 🇼🇳
+ 1
Thanks ᮉsÉŻ@ÊŒđŸ™ƒđŸ™ƒ Akash Agrawal for the help! Now i got it what you guys mean. That was a silly mistake by me đŸ€Ș (I think this is how you learn programming).
19th Aug 2020, 4:22 PM
Pawan
Pawan - avatar
0
Not working :(
19th Aug 2020, 9:15 AM
Pawan
Pawan - avatar
0
Js is completely new for me. Can someone share my code after fixing it? Akash Agrawal ᮉsÉŻ@ÊŒđŸ™ƒđŸ™ƒ Jayakrishna🇼🇳
19th Aug 2020, 1:26 PM
Pawan
Pawan - avatar