- 1

My javascript programs Eventlistener not work?

hello dear helper my javascript project not work in sololearn apps... But the program work in my computer please help my project problem solf

6th May 2021, 4:57 AM
jakaria sikder
jakaria sikder - avatar
2 odpowiedzi
+ 2
jakaria sikder Make a code and share link here. We can't help like this. Btw write your js code inside this window.onload = function () { }
6th May 2021, 9:39 AM
A͢J
A͢J - avatar
0
my javascript code : var title = document.querySelector("#subjectName"); var titleA = document.querySelector(".kar"); var btn = document.querySelector("#btn"); var pr = document.querySelector("#title_result"); btn.addEventListener('click', function(){ if(titleA.value == "" || title.value == ""){ alert("please feel the box"); }else if(titleA.value>=80 && titleA.value<=100){ var newR = document.createElement("tr"); var newh = document.createElement("th"); var newj = document.createElement("th"); var newi = document.createElement("th"); newh.innerHTML= title.value; newj.innerHTML= titleA.value; newi.innerHTML= "A+" ; newR.appendChild(newh); newR.appendChild(newj); newR.appendChild(newi); pr.appendChild(newR); }else if(titleA.value>=70 && titleA.value<80){ var newR = document.createElement("tr"); var new
6th May 2021, 7:13 AM
jakaria sikder
jakaria sikder - avatar