12 2017 档案
摘要:jQuery.parent(expr) //找父元素 jQuery.parents(expr) //找到所有祖先元素,不限于父元素 jQuery.children(expr) //查找所有子元素,只会找到直接的孩子节点,不会返回所有子孙 jQuery.contents() //查找下面的所有内容,包
阅读全文
摘要:<script type="text/javascript"> $(document).ready(function() { $(window).scroll(function() { //$(document).scrollTop() 获取垂直滚动的距离 //$(document).scrollL
阅读全文
摘要:IOS的UIWebView中JS点击事件,需要加入cursor:pointer;属性才可以。 Android的WebView可以支持外链样式,js文件;IOS则需要改为内嵌样式和JS文件。
阅读全文
摘要:function changeTwoDecimal_f(x) { var f_x = parseFloat(x); if (isNaN(f_x)) { alert('function:changeTwoDecimal->parameter error'); return false; } var f
阅读全文
摘要:$(dom).offset() 方法返回或设置匹配元素相对于文档的偏移(位置)。{left:100,top:100} $(dom).scrollTop() 方法返回或设置匹配元素的滚动条的垂直位置。 eg: 如果想让这段js被chrome和Firefox都支持的话,应该这样:
阅读全文

浙公网安备 33010602011771号