<html>
<head>
<title>getter</title>
<script type = "text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js">
</script>
<script type="text/javascript" language ="javascript">
$(document).ready(function()
{
var title =$("em").attr("title"); //getter
$("#divid").text(title);
});
</script>
</head>
<body>
<div>
<em title="Learn jQuery"> Introduction </em>
<p id="myid"> First program </p>
<div id="divid"></div>
</div>
</body>
</html>
<html>
<head>
<title>setter</title>
<script type = "text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js">
</script>
<script type="text/javascript" language ="javascript">
$(document).ready(function()
{
$ ("table").attr("border", function(arr)
{
return arr;
});
});
</script>
</head>
<body>
<table><tr><td>BE</td></tr></table>
<table><tr><td>MCA</td></tr></table>
<table><tr><td>MBA</td></tr></table>
<table><tr><td>PGDM</td></tr></table>
</body>
</html>