Help inserting js into html


#1

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


#2

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

thx I appreciate the help


#4

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


Too much to post here