在网页中的<a id="hello" href="#">hello world</a> 获取这个超链接显示的值:$('#hello').html();
(1) 设置这个超链接的值自然的也是这个方法:$('#hello').html("This is my home");
(2) 设置超链接的属性值得方法为:$('#hello').attr('href',属性的值),这个方法同样也可以设置其他标签的属性。
在网页中的<a id="hello" href="#">hello world</a> 获取这个超链接显示的值:$('#hello').html();
(1) 设置这个超链接的值自然的也是这个方法:$('#hello').html("This is my home");
(2) 设置超链接的属性值得方法为:$('#hello').attr('href',属性的值),这个方法同样也可以设置其他标签的属性。