How to Create Get Content and Attributes in jQuery
In this article, you will learn How to Create Get Content and Attributes in jQuery. Get Content Example:-
…<html>
<head>
<title>Get Content</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#btn1").click(function(){
alert("Text: " + $("#test").text());
});
$("#btn2").click(function(){
alert("HTML: " +