http://demo.v1study.com



Code <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js">
</script>
<script>
$(function(){
$("input").click(function(){
alert("Giá trị của thuộc tính href:\n" + $("#a2").attr("href"));
$("#a2").html("<em>http://v1study.com</em>");
$("#a2").attr("href","http://v1study.com");
alert("Sau khi đặt lại giá trị cho thuộc tính href:\n" + $("#a2").attr("href"));
});
});
</script>
</head>
<body>
<p><a href="https://demo.v1study.com" id="a2">https://demo.v1study.com</a></p>
<input id="input" type="button" value="Lấy giá trị của thuộc tính 'href'">
</body>
</html>