Now the thing is that on entering some text in textbox and when i click Ok button I should get the message displayed as "Welcome" + the inputed text. I tried below using jquery but it isn't working.
$(document).ready(function() {
$("#btnId").click(function() {
var inputValue = $("#txt").val();
$("#address").text("\"Welcome" + " " + inputValue "\");
}
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
Enter your name:<input type="text" id="txt>
<button id=" btnId ">Ok</button>
<div id="address "></div>
Aucun commentaire:
Enregistrer un commentaire