Welcome Message jQuery Program

Welcome Message jQuery Cognizant Handson Program

Create a web page which should contain an input box, ‘Ok’ button, and a ‘p’ tag with the id ‘address’. When the user enters his/her name into the text box, display a welcome message using jQuery.

welcome.js

//Write Your jQuery Code Here
$("#btnId").click(function(){
    var name=$('#txt').val();
    var msg="Welcome "+name+"!";
    $("#address").html('"'+msg+'"');
});

Similar Posts