$(document).ready(function () { $("#myButton").click(function () { $("#targetP").text("Welcome to 20 Fingers and 2 Brains. You clicked text() button."); }); });
<html> <head> <title>text</title> </head> <body> <p id="targetP">This is 20 Fingers and 2 Brains.</p> <input type="button" id="myButton" value="text()"/> <input type="button" id="reset" Value="Reset" onclick="location.reload()" /> </body> </html>