ITeye博客

js

共 4 篇文章

Angularjs构建一个CRUD应用可能用到的全部内容包括:数据绑定、基本模板标识符、表单验证、路由、深度链接、组件重用、依赖注入

使用Angularjs 优点: 构建一个CRUD应用可能用到的全部内容包括:数据绑定、基本模板标识符、表单验证、路由、深度链接、组件重用、依赖注入。 var AppController = function($scope) { /** 显示列表 **/ $scope.AppList = []; $scope.getAppPageList = function(page, size, noDigest) { DAO.getAppPageList(function(service){ $scope.AppList = service.appList; $scope.$digest(); // 刷…

2013-04-26 17:27 · web 开发 · javascript · js

jquery mobile url路由原理

<html> <head> <title>88888</title> </head> <body> <script> window.onhashchange = function() { alert(window.location.hash); } </script> <a href="#home" >home</a> <a href="#free" >free</a> </body> </html>

2013-03-04 14:24 · javascript · js

js 得到元素的绝对位置

function getIE(e){ var t=e.offsetTop; var l=e.offsetLeft; while(e=e.offsetParent){ t+=e.offsetTop; l+=e.offsetLeft; } alert("top="+t+"\nleft="+l); }

2011-07-01 14:06 · js · HTML · JavaScript

js,jQuery,javascript获得网页的高度和宽度

网页可见区域宽: document.body.clientWidth 网页可见区域高: document.body.clientHeight 网页可见区域宽: document.body.offsetWidth (包括边线的宽) 网页可见区域高: document.body.offsetHeight (包括边线的高) 网页正文全文宽: document.body.scrollWidth 网页正文全文高: document.body.scrollHeight 网页被卷去的高: document.body.scrollTop 网页被卷去的左: document.body.scrollLeft 网…

2010-08-22 21:17 · javascript · js · 工作 · jQuery · JavaScript