<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
$.extend({
setHref: function(type,content){
$('body a').each(function(){
if(type == 'content'){
$(this).html(content);
}else if(type == 'target'){
$(this).attr("target",content);
}else{
$(this).attr("href",content);
}
});
}
});
$.setHref('content','点想网络');
$.setHref('target','_blank');
$.setHref('href','http://www.dianthink.com');
});
</script>
<style type="text/css">
body,a{
padding: 0px;
width: 500px;
margin: 0 auto;
color: #6D6D6D;
}
a{
display: block;
width: 248px;
float: left;
text-align: center;
height: 50px;
line-height: 50px;
text-decoration: none;
color: #FFF;
background: #4D9A97;
margin: 1px;
font-family: '微软雅黑';
}
</style>
</head>
<body>
<a href="" title=""></a>
<a href="" title=""></a>
<a href="" title=""></a>
<a href="" title=""></a>
<a href="" title=""></a>
<a href="" title=""></a>
<a href="" title=""></a>
<a href="" title=""></a>
<a href="" title=""></a>
<a href="" title=""></a>
<a href="" title=""></a>
<a href="" title=""></a>
</body>
</html>
发表评论 取消回复