Attach a function to the focus event. The focus event occurs (display a message regarding the text field
- جي كويري
- 2021-09-22
- mhanasmh00489829403
الأجوبة
HTML Code :
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<meta charset="utf-8">
<title>Attach a function to the focus event</title>
</head>
<body>
<p><input type="text"> <span>Input your first name</span></p>
<p><input type="text"> <span>Input your last name</span></p>
</body>
</html>
JavaScript Code :
$( "input" ).focus(function() {
$( this ).next( "span" ).css( "display", "inline" ).fadeOut(5000);
});
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال
معلومات ذات صلة