My code as follows
In my run mode as follows
In my run mode as follows
Hello (Input type)
lblmsg The data does not match
When i type the text in Input type, i want to clear the lblmsg text the data does not match.
for that how can i do in asp.net
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rahul SinghPosted Sep 11, 2016, 11:15 AM
<body>
<input type = "text" id="Empid" Placeholder = "Hello" runat="server" onchange="myFunction()">
<asp:Label ID="lblmsg" runat="server" Text=""></asp:Label>
<script>
function myFunction() {
var x = document.getElementById("Empid").value;
document.getElementById("lblmsg").innerHTML = "You selected: " + x;
}
</script>
</body>
</html>
Midhun TpPosted Sep 11, 2016, 10:39 AM