Document.write The return | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Document.write The return

can I use this following code in js and HTML: document.write("<button onclick='function()'>sentence </button> ???

5th Oct 2018, 3:28 PM
Samuel STEF
Samuel STEF - avatar
1 Answer
+ 7
yes but it is better to use .innerHTML method instead of .write
5th Oct 2018, 7:31 PM
AliR૯za
AliR૯za - avatar