What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

on click button not working. Could you please help me in identifying the bug


New member
<!DOCTYPE html>
<title>program 1a</title>
<body style="background-color:green">
<h2>when you click on press me it will change text</h2>
<p id="Demo">Gokaraju</p>
<button onclick="Change text()">click me
function "Change text()"
document.getElementById("Demo").innerHTML="2nd CSE A");