jquery 标签页
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<style>
.tab {
width:100px;
height:30px;
float:left;
background-color:green;
color:white;
margin:1px;
}
#dv {
border:1px solid pink;
width:404px;
height:100px;
background-color:aliceblue
}
</style>
<script src="jquery-1.7.1.min.js">
</script>
<script>
$(function () {
$('div.tab').mouseover(function () {
$('#dv').text(this.innerText);
});
});
</script>
</head>
<body>
<div class="tab">标签1</div>
<div class="tab">标签2</div>
<div class="tab">标签3</div>
<div class="tab">标签4</div>
<div id="dv">content</div>
</body>
</html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<style>
.tab {
width:100px;
height:30px;
float:left;
background-color:green;
color:white;
margin:1px;
}
#dv {
border:1px solid pink;
width:404px;
height:100px;
background-color:aliceblue
}
</style>
<script src="jquery-1.7.1.min.js">
</script>
<script>
$(function () {
$('div.tab').mouseover(function () {
$('#dv').text(this.innerText);
});
});
</script>
</head>
<body>
<div class="tab">标签1</div>
<div class="tab">标签2</div>
<div class="tab">标签3</div>
<div class="tab">标签4</div>
<div id="dv">content</div>
</body>
</html>