Error: Cannot find inner HTML property of null | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Error: Cannot find inner HTML property of null

in my code there like that , <form id=fm ></form>

16th Jun 2016, 6:05 AM
Pranjal
Pranjal - avatar
4 Answers
+ 1
You can use jQuery Like this: $('#myform').html();
16th Jun 2016, 1:10 PM
Lenin Jose Meza Zarco
Lenin Jose Meza Zarco - avatar
0
Where is your JavaScript code?
16th Jun 2016, 7:42 AM
James Flanders
0
var elm = document.getElementsByTagName("form"); elm[0].innerHTML = "string"; OR var elm = document.getElementById("fm"); elm.innerHTML = "string";
28th Jun 2016, 7:47 PM
Shabi Levi
Shabi Levi - avatar
0
m.b. id should be between " or ' symbols?
30th Jun 2016, 2:18 PM
Sergey Pautov
Sergey Pautov - avatar