代码改变世界

Javascript DOM 编程艺术:优雅降级

2012-08-23 23:58 by youxin, 546 阅读, 0 推荐, 收藏,
摘要:这一章可谓本书的核心章节之一。作者不仅介绍了很多实用的技术,更阐明了在 Scripting 编程方面的一些核心理念。学东西,一方面是表面上的规定和技巧,另一方面就是技巧背后的思想了。掌握了这些核心思想,我想在其他领域也可以得到验证和应用。一、过去的错误 作者首先提到了在过去几年里,人们对 JS 的误用造成的不必要的误解。很多网页设计师不愿意去学习 JS,而是仅仅把一些现成的代码片段拿来用,以实现某个特定的功能。他们并没有考虑假如 JS 被禁用,他们的网站还能够正常展现吗?你可能会有疑问,难道还有人手动禁用浏览器的 JS 功能?呵呵,这种人或许很少,但是有一种生物——网络爬虫,它们是不能识别 . 阅读全文

Javascript DOM 编程艺术: popUp

2012-08-23 23:45 by youxin, 399 阅读, 0 推荐, 收藏,
摘要:JavaScript uses the open() method of the window object to create new browser windows.The method takes three arguments: window.open(url,name,features)All of the arguments are optional. The first argument is the URL for the document you want to open in a new window. If this is missing, an empty brows. 阅读全文

css background详解

2012-08-23 23:31 by youxin, 353 阅读, 0 推荐, 收藏,
摘要:原文链接:Backgrounds In CSS: Everything You Need To Know译文链接:css 背景全攻略转载请保留版权以及链接——————————————————————————————背景(background)是css中一个重要的的部分,也是需要知道的css的基础知识之一。这篇文章将会涉及css背景(background)的基本用法,包括诸如 background-attachment 等的属性,也会介绍一些有关背景(background)的常用技巧,以及 css3 中的 背景(background)(包含4个新的背景(background)属性)。css2 中 阅读全文

Javascript DOM 编程艺术:创建一个简单的gallery

2012-08-23 23:20 by youxin, 322 阅读, 0 推荐, 收藏,
摘要:开始的html如下:<!DOCTYPE html><html lang="en"><head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Image Gallery</title></head><body> <h1>Snapshots</h1> <ul> <li> <a hre 阅读全文

Javascript DOM 编程艺术:dom 节点及操作节点方法

2012-08-23 22:25 by youxin, 273 阅读, 0 推荐, 收藏,
摘要:element nodestext nodesattribute nodesThere are quite a few other types of nodes. Comments are a separate node type, forinstance. But I’d just like to mention one more node type here.Attributes are used to give more specific information about an element. The title attribute,for example, can be used 阅读全文

Javascript DOM 编程艺术:object

2012-08-23 21:39 by youxin, 317 阅读, 0 推荐, 收藏,
摘要:There is one very important data type that we haven’t looked at yet: objects. An object is aself-contained collection of data. This data comes in two forms: properties and methodsA property is a variable belonging to an object.A method is a function that the object can invoke.These properties and me 阅读全文

Javascript DOM 编程艺术:Array

2012-08-23 21:28 by youxin, 326 阅读, 0 推荐, 收藏,
摘要:声明一个定长的数组var beatles = Array(4);Sometimes you won’t know in advance how many elements an array is eventually going tohold. That’s OK. Specifying the number of elements is optional. You can just declare anarray with an unspecified number of elements:var beatles = Array();Adding elements to an array i 阅读全文

转:JS定义类的几种方法

2012-08-23 19:11 by youxin, 258 阅读, 1 推荐, 收藏,
摘要:将近20年前,Javascript诞生的时候,只是一种简单的网页脚本语言。如果你忘了填写用户名,它就跳出一个警告。如今,它变得几乎无所不能,从前端到后端,有着各种匪夷所思的用途。程序员用它完成越来越庞大的项目。Javascript代码的复杂度也直线上升。单个网页包含10000行Javascript代码,早就司空见惯。2010年,一个工程师透露,Gmail的代码长度是443000行!写和维护如此复杂的代码,必须使用模块化策略。目前,业界的主流做法是采用”面向对象编程”。因此,Javascript如何实现面向对象编程,就成了一个热门课题。麻烦的是,Javascipt语法不支持”类”(class), 阅读全文

php 表单加密验证

2012-08-23 17:05 by youxin, 788 阅读, 0 推荐, 收藏,
摘要:SHA-1 is considered secure because it’s said to be computationally infeasible to work out theoriginal text or to find two sets of text that produce the same number. This means that even ifyour password file is exposed, no one will be able to work out what the passwords are. It alsomeans that you hav 阅读全文

IE zoom:1 修复

2012-08-23 15:11 by youxin, 347 阅读, 0 推荐, 收藏,
摘要:zoom:1 一直都是被很多人 用来激活 ie浏览器(ie6, ie7, ie8)中 dom节点的haslayout 属性,http://stackoverflow.com/questions/6287023/what-bug-does-zoom1-fix-in-css 阅读全文
上一页 1 ··· 214 215 216 217 218 219 220 221 222 ··· 269 下一页