Answer: Here on the text box lose focus, we should create
onblur event fires and we should execute
callfuncton and we should set a background color for text box to highlight
example:
Enter your name: <input type="text" name="txtName" id="txtName" onblur="CallFunction(this.id)" />
<input type="button" id="btn" name="btn" value="Submit" />
<script type="text/javascript">
function CallFunction(id) {
document.getElementById(id).style.background = "blue";
}
</script>
Asked In: While Learning |
Alert Moderator