![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JS&jQuery
文章平均质量分 54
pepe_泡泡
java web 开发
展开
-
getBoundingClientRect() 来获取页面元素的位置
该方法获得页面中某个元素的左,上,右和下分别相对浏览器视窗的位置。该方法已经不再是IE Only了,FF3.0+和Opera9.5+已经支持了该方法,可以说在获得页面元素位置上效率能有很大的提高,在以前版本的Opera和Firefox中必须通过循环来获得元素在页面中的绝对位置。 script>document.getElementById('转载 2013-06-14 17:06:30 · 532 阅读 · 0 评论 -
js Location属性和方法的实例说明
location 属性:实例url: http://localhost:8080/org/group/index?fromString=bctop#part2location.href: http://localhost:8080/org/group/index?fromString=bctop#part2location.protocol原创 2013-06-17 13:57:05 · 776 阅读 · 0 评论 -
jQuery: 父页面调用iframe中子页面的DOM对象
父页面中的iframe,id为"fileUploadFrame": iframe中的JSP页面中的对象: dom1" type="text" value=""/>父页面jQuery: var $frameBody = $("#fileUploadFrame").contents().find("body"); var $dom1 = $fram原创 2013-06-21 11:15:39 · 762 阅读 · 0 评论 -
js 阻止事件冒泡的两种方式的方法实例
/*阻止 父级dom 事件冒泡*/ function stopPropagation(e) {alert('onclick button');e = e || window.event;if(e.stopPropagation) { //W3C阻止冒泡方法e.stopPropagation();} else {e.cancelBubble = true; //IE阻止原创 2013-06-23 21:50:09 · 945 阅读 · 0 评论