תיאור: מקשר מטפל אירוע לאירוע "focusout" של JavaScript.
.focusout( handler(eventObject) )
הוספה בגרסה: 1.4
handler(eventObject)
פונקציה מופעלת כל פעם, כאשר מופעל אירוע.
.focusout( [ eventData ], handler(eventObject) )
הוספה בגרסה: 1.4.3
eventData
המפה של הנתונים שתעבור למטפל האירוע.
handler(eventObject)
פונקציה לביצוע כל פעם שאירוע מופעל.
דוגמה
מציג איבוד פוקוס בתוך פסקאות, שימו לב על ההבדל במדד focusout ומדד blur .דוגמה - קוד מלא:
מציג איבוד פוקוס בתוך פסקאות, שימו לב על ההבדל במדד focusout ומדד blur .
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
.inputs { float: left; margin-right: 1em; }
.inputs p { margin-top: 0; }
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
var fo = 0, b = 0;
$("p").focusout(function() {
fo++;
$("#fo")
.text("focusout fired: " + fo + "x");
}).blur(function() {
b++;
$("#b")
.text("blur fired: " + b + "x");
});
});
</script>
</head>
<body>
<div class="inputs">
<p>
<input type="text" /><br />
<input type="text" />
</p>
<p>
<input type="password" />
</p>
</div>
<div id="fo">focusout fire</div>
<div id="b">blur fire</div>
</body>
</html>
האם מידע זה היה מועיל?

