摘要: 1、修改样式 document.getElementByIdx( "div1").style.display = "none";2、鼠标悬停图标变小手 style="cursor:pointer" 显示为手 style="cursor:wait" 显示为忙碌,通常为一个沙漏 style="cursor:help" 显示为帮助,通常为一个问号或者为气球3、清空输入框的内容 $("#div").val('');4、输入框的默认值 输入后消失(说是主要用于搜索)5、 阅读全文
posted @ 2013-12-19 15:01 yttsic 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 代码先贴这里,随后再改$('#tipb').css("top",$(document).scrollTop()+($(window).height())/2-50+"px");1、scrollTop()的返回值是当前元素的滚动条距离其顶部的垂直距离(对象元素必须要有滚动条才行!)。如果是document的话也就是屏幕的最上方距离元素最上方的距离。2、获取某元素距离文档最上方的垂直距离。var offset = $("#abcd").offset();var e_top=offset.top;alert(offset.t 阅读全文
posted @ 2013-12-19 09:52 yttsic 阅读(347) 评论(0) 推荐(0) 编辑