经常看到this.t = this.title;中this.t的t什么意思呢?
时间:2009-07-15
来源:互联网
是属性还是?
作者: cnfi 发布时间: 2009-07-15
作者: shawphy 发布时间: 2009-07-15
this.tooltip = function(){
/* CONFIG */
xOffset = 10;
yOffset = 20;
// these 2 variable determine popup's distance from the cursor
// you might want to adjust to get the right result
/* END CONFIG */
$("a.tooltip").hover(function(e){
this.t = this.title;
this.title = "";
$("body").append("<p id='tooltip'>"+ this.t +"</p>");
$("#tooltip")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px")
.fadeIn("fast");
},
function(){
this.title = this.t;
$("#tooltip").remove();
});
$("a.tooltip").mousemove(function(e){
$("#tooltip")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px");
});
};
// starting the script on page load
$(document).ready(function(){
tooltip();
});
我找的实例的网址是http://iinan.yo2.cn/articles/jquery-using-the-most-simple-to-use-the-mouse-across-the-tips-and-automatic-image-preview-2.html 最后一个例子

作者: cnfi 发布时间: 2009-07-15
this.t = this.title;
这不就是么?
作者: shawphy 发布时间: 2009-07-15
那就是
this.a = null;都行??随便定义?
作者: cnfi 发布时间: 2009-07-17
作者: xyq159589 发布时间: 2009-07-17
这样都行?
那就是
this.a = null;都行??随便定义?
动态语言是可以随意添加属性的,只要对属性赋值,这个属性就存在了
作者: keakon 发布时间: 2009-07-17
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28