Create a paragraph element with some text and append it to the end of the document body using jQuery

  • جي كويري

Create a paragraph element with some text and append it to the end of the document body using jQuery.

الأجوبة

HTML Code:

<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-git.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Create a paragraph element with some text and append it to the end of the document body using jQuery.</title>
</head>
<body>
<p>jQuery</p>
</body>
</html>

JavaScript Code :

$( "p" ).add( "<span>Exercises</span>" ).appendTo( document.body );
هل كان المحتوى مفيد؟

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

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

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