الأجوبة
HTML Code :
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<meta charset="utf-8">
<title>jQuery: Attach a function to the blur event</title>
</head>
<body>
<form>
<input id="field1" type="text" value="Field 1">
<input id="field2" type="text" value="Field 2">
</form>
<p>Write something in the input Field 1, and then click outside the field to check lose focus.</p>
</body>
</html>
JavaScript Code :
$( "#field1" ).blur(function() {
alert( "Lose focus from Field1" );
});
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال
معلومات ذات صلة