Set the background color of a page to red using jquery

  • جي كويري

Set the background color of a page to red using jquery

الأجوبة

HTML Code:

<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
  <meta charset="utf-8">
  <title>Set the background color of a page to red</title>
</head>
<body>
  <p>Set the background color of the page to red</p>
</body>
</html>

JavaScript Code:

$(document.body).css( "background", "red" );
هل كان المحتوى مفيد؟

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

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

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