Fix broken images automatically. Hide the following broken img tag in the body section using jquery

  • جي كويري

  using jquery Fix broken images automatically.
Hide the following broken img tag in the body section.

Sample Data :

<body>
<a href="https://www.w3resource.com"><img src="//www.w3resource.com/image/w3resourcelogo.gif" alt="w3resource logo" width="150" height="78" /></a> </body>

الأجوبة

<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
  <meta charset="utf-8">
  <title>Fix broken images automatically</title>
</head>
<body>
<a href="https://www.w3resource.com/images/w3resource-logo.png" alt="w3resource logo" width="150" height="78" onerror='$(this).hide();'/></a>
</body>
</html>
هل كان المحتوى مفيد؟

معلومات ذات صلة

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...