Why this code showing error on this platform but same code on laptop it's working properly 😕 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why this code showing error on this platform but same code on laptop it's working properly 😕

Can anyone explain and tell me how to solve this error 🧐 Why this code showing error on this platform but same code on laptop it's working properly 😕 https://code.sololearn.com/WINcCIAyvDEe/?ref=app My friends can you explain why this is showing error Darpan kesharwani🇮🇳 I Am Rochie lolo 🌍🌎🌏ᴀɪᴍ🌍🌎🌏 Steve Sajeev

27th Oct 2023, 2:17 PM
Shaikh Jahangir Alam
Shaikh Jahangir Alam - avatar
6 Answers
+ 6
Shaikh Jahangir Alam . as @koli said... Also you can remove the error by using this ` script` tag .. See this modified version... https://code.sololearn.com/WQDA6m9cZBqo/?ref=app
27th Oct 2023, 3:30 PM
Darpan kesharwani🇮🇳[Inactive📚]
Darpan kesharwani🇮🇳[Inactive📚] - avatar
+ 6
Before you can use HTML items in your code you have to wait at least until DOM content is loaded. The quickest way to running the code shows this example: https://sololearn.com/compiler-playground/WVqoL72aaWx2/?ref=app
27th Oct 2023, 3:55 PM
JaScript
JaScript - avatar
+ 3
Insert your entire js program inside `window.onload = () => {}` See this one: https://code.sololearn.com/WFJOZ5qMdNXy/?ref=app
27th Oct 2023, 2:33 PM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 1
Thank you All 👍
28th Oct 2023, 8:34 AM
Shaikh Jahangir Alam
Shaikh Jahangir Alam - avatar
+ 1
Shaikh Jahangir Alam I modified your code to remove the annoying text selection and blue highlighting overlay when clicking in the app on phones and touch devices. I also tweaked the js so that the cursor div is correctly centered on the pointer. https://code.sololearn.com/WYLs0639Gdcf/?ref=app
29th Oct 2023, 12:19 AM
Bob_Li
Bob_Li - avatar
+ 1
Thank you for modify my Bob_Li ❤️
29th Oct 2023, 5:38 AM
Shaikh Jahangir Alam
Shaikh Jahangir Alam - avatar