<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="../jquery.js"></script>
</head>
<body>
<a id="target" href="http://opentutorials.org">opentutorials</a>
<a id="t1" href="http://opentutorials.org">opentutorials</a>
<input type="checkbox" id="t2" checked="checked">
<ul>
<li class="marked">html</li>
<li>class</li>
<li id="active">java
<ul>
<li>core</li>
<li class="marked">DOM</li>
<li class="marked">BOM</li>
</ul>
</li>
</ul>
<script>
var t = $('#target');
console.log(t.attr('href'));
t.attr('title','opentutorials')
t.removeAttr('title');
var t1= $('#t1');
console.log(t1.attr('href'));
console.log(t1.prop('href'));
var t2=$('#t2');
console.log(t2.attr('checked'));
console.log(t2.prop('checked'));
t2.removeAttr('checked');
$('.marked','#active').css('background-color','red');
$("#active .marked").css('background-color','green');
$('#active').find('.marked').css('background-color','blue')
</script>
</body>
</html>