随笔分类 -  [05] JavaScript/Ajax

用于设计网页/网站。AJAX提高用户体验。
摘要:随着用JavaScript编程的深入,你会开始理解那些JavaScript给出的不透明错误信息。一旦你理解了你常犯的一般性错误,你就会很快知道怎样避免它们,这样你写的代码中的错误将越来越少。编程实际上是一种能随着时间不断飞快进步的技术。但是不管变得多么熟练,你仍然要花一些时间调试你的代码。如果你做过家庭作业,或有过JacaScript编程经验,你会知道相当多的时间是花在调试上。这很正常 - ... 阅读全文
posted @ 2009-04-04 23:25 emanlee 阅读(359) 评论(0) 推荐(0) 编辑
摘要:There's a couple of exceptions to look out for when you start developing custom ASP.NET Ajax client controls. They are: Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same id 'ctl00_MainContentPlaceHolder__eventsRepeater_ctl01_ke1' can't be ad 阅读全文
posted @ 2009-04-02 23:12 emanlee 阅读(3233) 评论(0) 推荐(0) 编辑
摘要:HTML 4.0 Event Attributes New to HTML 4.0 is the ability to let HTML events trigger actions in the browser, like starting a JavaScript when a user clicks on an HTML element. Below is a list of attrib... 阅读全文
posted @ 2009-03-19 22:20 emanlee 阅读(434) 评论(0) 推荐(0) 编辑
摘要:Quick reference: .Any character except newline. \.A period (and so on for \*, \(, \\, etc.) ^The start of the string. $The end of the string. \d,\w,\sA digit, word character [A-Za-z0-9_], or whit... 阅读全文
posted @ 2009-03-19 18:36 emanlee 阅读(1190) 评论(0) 推荐(0) 编辑
摘要:正则表达式是一个描述字符模式的对象。 Javascrīpt的RegExp对象和String对象定义了使用正则表达式来执行强大的模式匹配和文本检索与替换函数的方法. 在Javascrīpt中,正则表达式是由一个RegExp对象表示的.当然,可以使用一个RegExp()构造函数来创建RegExp对象,也 阅读全文
posted @ 2009-03-19 18:35 emanlee 阅读(353) 评论(0) 推荐(0) 编辑
摘要:Enable the Safari Debug menu option on Windows To enable the Safari Debug menu option, you need to find your Preferences.plist file located in %APPDATA%\Apple Computer\Safari (%APPDATA is typically C... 阅读全文
posted @ 2009-03-18 23:29 emanlee 阅读(2824) 评论(0) 推荐(0) 编辑
摘要:================= I have tried like this.. function fnPrint() { document.getElementById('print').style.visibility='hidden'; window.all.print(); document.getElementById('print').style.... 阅读全文
posted @ 2009-03-18 23:28 emanlee 阅读(352) 评论(0) 推荐(0) 编辑
摘要:Copy this script into your JavaScript files. It works immediately, and you can query three properties of the BrowserDetect object: Browser name: BrowserDetect.browser Browser version: BrowserDetect.v... 阅读全文
posted @ 2009-03-14 23:42 emanlee 阅读(287) 评论(0) 推荐(0) 编辑
摘要:js函数绑定到asp.net的控件上: 用 控件.Attributes.Add(事件,函数) 。 在 asp.net 中访问 html 控件: 一气之下,把所有控件都换成了 html 的,然后在控件上加上 runat=server 这样在 asp.net 中就可以引用了。用 (FindControl(控件id) as html控件类型).属性,如 (this.FindC... 阅读全文
posted @ 2009-03-14 18:04 emanlee 阅读(582) 评论(0) 推荐(0) 编辑
摘要:In 2005 when Google implemented Google Suggest, Ajax took off. Every web developer was trying to duplicate what Google accomplished. Its now 2008 and there are tons of ways to accomplish Google Suggest. Below is a list of 10 Auto Complete Scripts with various frameworks. The list below is in no part 阅读全文
posted @ 2009-03-14 00:20 emanlee 阅读(627) 评论(0) 推荐(0) 编辑
摘要:网站开发者的一大苦恼,就是有太多的浏览器要应付。幸亏世界上有一些聪明的人,能够研究出一大些方便编辑和调试网页代码的好工具。不过,要从不计其数的小工具里面找出合适的可真不容易。这篇文章列出了几个最好用的web开发工具,并指导你快速地激活、安装、使用他们。 下面是工具列表: Web Developer ToolbarFirefox上开发和调试web站点的不二之选。Web developer too... 阅读全文
posted @ 2009-03-12 22:52 emanlee 阅读(442) 评论(0) 推荐(0) 编辑
摘要:一些前端开发 IE 中的常用调试工具: Microsoft Script Debugger —— Companion.JS need to install this Companion.JS —— Javascript debugger for IE , like Console API feature IE Developer Toolbar —— Like Firebug (DOM/CSS ... 阅读全文
posted @ 2009-03-12 22:37 emanlee 阅读(3390) 评论(0) 推荐(0) 编辑
摘要:parseFloat parseFloat("0.55zhang")的结果为0.55parseInt parseInt("123zhang")的结果为123这两个函数都有些容错性的,比如"123abc"会变成123.如果楼主希望更准确一些,其实可以判断一下,然后用eval,像这样不过也可以使用这样的... 阅读全文
posted @ 2009-03-10 22:21 emanlee 阅读(218) 评论(0) 推荐(0) 编辑
摘要:页可见区域宽: document.body.clientWidth网页可见区域高: document.body.clientHeight网页可见区域宽: document.body.offsetWidth (包括边线的宽)网页可见区域高: document.body.offsetHeight (包括边线的高)网页正文全文宽: document.body.scrollWidth网页正文全文高: do... 阅读全文
posted @ 2009-03-09 19:29 emanlee 阅读(403) 评论(0) 推荐(0) 编辑
摘要:from: http://www.aspxuexi.com/javascript/2007-2-24/2222.htm 在 javascript 中两种方式注册的监听器以及先后注册的监听器调用的顺序在各个浏览器都有所不同,在这里总结一下 IE、firefox 以及 Opera 三种浏览器的调用方式: IE: 通过属性注册的事件最先执行。 attachEvent 方式注册的事件后注册的先... 阅读全文
posted @ 2008-12-22 10:28 emanlee 阅读(1950) 评论(0) 推荐(0) 编辑
摘要:ref: http://blog.sina.com.cn/s/blog_4b1a1001010007zf.html http://hi.baidu.com/trip008/blog/item/80b56aa7a09c0b91d0435821.html 前台: function GetFocus() { if(event.keyCode==13) { doc... 阅读全文
posted @ 2008-09-19 21:08 emanlee 阅读(2141) 评论(0) 推荐(0) 编辑
摘要:javascript代码格式化工具 网上下载的js代码经常遇到代码已被压缩(注释、换行、缩进、空格、TAB等都被删除了),如果拿来学习、研究的话必定看到头晕。有些编辑器的“格 式化代码”功能可以解决这个问题,在网上搜索了一下,找到一些这样的工具,其中用sourceformatx 很不错,支持很多语言,不过要收费,未注册的不能格式化大于8k的代码。注册费188元,太贵了;TextRush虽说免费,但... 阅读全文
posted @ 2008-08-17 21:02 emanlee 阅读(7363) 评论(0) 推荐(1) 编辑
摘要:最早也是最出名的要数prototype了,这款鼻祖级的JavaScript库,如今已经配了新的搭档,那就是Script.aculo.us,这是一款完全基于prototype的开发框架,提供了相当数量 的上层应用组件和函数,你可以这么理解,假如把prototype比作MSIL,那么 Script.aculo.us就是.NET语言。目前 prototype的最新版本是1.6,Script.aculo.... 阅读全文
posted @ 2008-08-17 10:10 emanlee 阅读(1163) 评论(1) 推荐(0) 编辑

点击右上角即可分享
微信分享提示