日期:2014-05-16 浏览次数:20310 次
<script language="javascript">
function send(){
var tTip=$("#dong");
var left=tTip.offset().left;
var top=tTip.offset().top;
tTip.css({
"left":left,
"top":top-45
}).fadeIn("show",function(){
});
}
</script>
<body >
<a href="#" onClick="send()">回复</a>
<div id="dong" style="display:none">你好</div>
<br/>
<a href="#" onClick="send()">回复</a>
</body>
<script language="javascript" src="http://www.coding123.net/js/jquery.js"></script>
<script language="javascript">
function send(a){
var tTip=$("#dong"),p=$(a).offset();
var left=p.left;
var top=p.top+a.offsetHeigth;
tTip.css({
"left":left,
"top":top
}).fadeIn("show",function(){
});
}
</script>
<body >
<a href="#" onClick="send(this)">回复</a>
<div id="dong" style="display:none;position:absolute">你好</div>
<a href="#" onClick="send(this)">回复</a>
</body>