Welcome Message
Please refer to the sample page for more clarifications.
Note:
Do not alter the given 'welcome.html' file. Write your jQuery code in the file 'welcome.js'.
Avoid writing the jQuery 'document ready' method for the proper web page visibility.
Do not use 'ES6' features.
Welcome.html:
<!-- DO NOT ALTER THIS FILE -->
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<br>
Enter your name: <input type="text" id="txt">
<button id="btnId">Ok</button>
<div id="address"></div>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="welcome.js"></script>
</body>
</html>
welcome.js
//Write Your jQuery Code Here
$('#btnId').click(function(){
$('#address').text("\"Welcome "+$('#txt').val()+"!\"");
});
No comments:
Post a Comment