<body>
<form id="form1" runat="server">
<div>
<a href="#" title="这是我的鼠标链接">提示</a>
<p>
<a href="#" class="higt1" title="这是我的鼠标链接1">提示1</a></p>
<p>
<a href="#" class="higt1" title="这是我的鼠标链接2">提示2</a></p>
<p>
<a href="#" title="这是我的鼠标链接3">提示3</a></p>
<p>
<a href="#" title="这是我的鼠标链接3">提示3</a></p>
</div>
</form>
</body> <script type="text/javascript">
$(function() {
var x = 20;
var y = 20; $("a.higt1").mouseover(function(e) {
this.mytitle = this.title;
this.title = "";
var toop = "<div id='tishi'>" + this.mytitle + "</div>";
$("body").append(toop);
$("#tishi")
.css({
"top": (e.pageY + y) + "px",
"left": (e.pageX + x) + "px"
}).show("fast");
}).mouseout(function() {
this.mytitle = this.title;
$("tishi").remove();
}).mouseover(function(e) { $("#tishi")
.css({ "top": (e.pageY + y) + "px", "left": (e.pageX + x) + "px" }); });
})
</script>
想实现的效果是 鼠标移动上去有提示的功能,就和自带的title 差不多,有提示的功能。这段代码也是从网上学过来的,但是实现不了 刚学jquery也解决不了了,来这里求助下。
解决方案 »
- 懂JS和ajax的高手帮忙指点一下,快疯了!
- 求javascript操作cookie的包!
- @@@@@@@大家进来看一下呀,全是一样的操作,如何简化我的代码
- 我刚学网页开发,我想问一下有经验的仁兄,能否实现以下效果?
- 后台自动添加的服务器控件以及其相应的事件,该事件无法进入、求解决
- 请问在加拿大有哪些比较好的ASP.NET空间供应商?强烈请求帮忙!
- 如何讓cookie過期,我試用了多種方法,好象都不行?
- vwd Solution Explorer中怎么看不见Database Explorer?
- 如何做到点击 button1 后能把多个被 checkbox 选中的项的id号转到另一页,并生成新的DataGrid
- VS.NET在数据库操作上的问题
- sql 语句的写法
- 火狐下布局问题
"left": (e.pageX + x) + "px",
"position":"absolute"
this.mytitle = this.title;
$("#tishi").remove();
})
$("#tishi").remove();