代码改变世界

阅读排行榜

获取对象样式

2012-09-19 10:07 by 江苏黑马, 270 阅读, 收藏,
摘要: // 获取对象计算的样式 this.getComputerStyle = (function() { var body = document.body; if (body.currentStyle) {// IE浏览器 return function(elem) { return elem.currentStyle; } } else if (document.defaultView.getComputedStyle)... 阅读全文

android模拟器 内存只读错误

2012-11-01 17:58 by 江苏黑马, 267 阅读, 收藏,
摘要: 解决办法:尝试新建不同版本 阅读全文

eclipse下安装tomcat运行提示路径错误

2012-11-05 16:12 by 江苏黑马, 260 阅读, 收藏,
摘要: 在建立完成服务器,添加项目之前,修改tomcat的配置:选择第二个: 阅读全文

元素页面位置[left,top]获取

2012-09-19 09:23 by 江苏黑马, 240 阅读, 收藏,
摘要: var getCanvasPos = function(canvas) { var left = 0; var top = 0; // 元素在页面的位置left和top while (canvas.offsetParent) { left += canvas.offsetLeft; top += canvas.offsetTop; canvas = canvas.offsetParent; } return [left, top]... 阅读全文

移动网页调试

2013-01-06 17:39 by 江苏黑马, 235 阅读, 收藏,
摘要: 1、下载weinre.jar。2、嵌入到页面script标签的src属性中。3、cmd命令:java -jar weinre.jar --httpPort 8081 --boundHost -all-。4、调试信息筛选:adblogcat|grep-iconsole 阅读全文