Display a message when the focus is removed from an element using jquery
- جي كويري
- 2021-09-17
- mhanasmh00489829403
الأجوبة
HTML Code :
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-git.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Display a message when the focus is removed from an element.</title>
</head>
<body>
<form>
<input id="target" type="text" value="Field 1">
<input type="text" value="Field 2">
</form>
<p>Set and remove focus from field1
</p>
</body>
</html>
JavaScript Code :
$( "#target" ).blur(function() {
console.log( "Remove focus from fields1!" );
});
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال
معلومات ذات صلة