Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
Farnaz.A It is possible. Just don't use append function. Use document.write See I have edited code again.
28th Apr 2021, 7:23 PM
A͢J
A͢J - avatar
+ 3
Farnaz.A appendChild is a function of JavaScript not jQuery. There is append function in jQuery.
28th Apr 2021, 7:03 PM
A͢J
A͢J - avatar
+ 2
Farnaz.A Use document.createElement() function to create new element and use appendChild() function to append that created element in any node element like body.
28th Apr 2021, 6:11 PM
A͢J
A͢J - avatar
+ 2
Farnaz.A No need to open document. You can directly use document. You can create like this https://code.sololearn.com/WzmooAA4Fnq2/?ref=app
28th Apr 2021, 6:19 PM
A͢J
A͢J - avatar
+ 2
Farnaz.A I just commented this line doc.open() and used append function https://code.sololearn.com/WNdpNdNHat0J/?ref=app
28th Apr 2021, 7:08 PM
A͢J
A͢J - avatar