Help inserting js into html

Was the code i was trying to implicate, but the console.log doesnt work. Can you help me out

script>console.log("Good joke? ");</script

console.log() logs to the console, not to a html webpage

ideally, use getElementById() and .innerHMTL to get JS code in a webpage:


edit, for security reasons textContent would be better then innerhtml:

3 Likes

thx I appreciate the help

this is only the basic, we can do so much more:


Too much to post here

1 Like