Javascript
bryanliu1982
这个作者很懒,什么都没留下…
展开
-
在b/s开发中经常用到的javaScript技术
在b/s开发中经常用到的javaScript技术一、验证类 1、数字验证内 1.1 整数 1.2 大于0的整数 (用于传来的ID的验证) 1.3 负整数的验证 1.4 整数不能大于iMax 1.5 整数不能小于iMin 2、时间类 2.1 短时间,形如 (13:04:06) 2.2 短日期,形如 (2003-12-05) 2.3 长时间,形如 (2003-12-05 13:04:06) 2.4 只原创 2006-01-12 19:35:00 · 1105 阅读 · 0 评论 -
DOJO + Eclipse
Dojo + Eclipsehttp://www.dojotoolkit.com/forum/dojo-foundation/general-discussion/eclipse-3-4-and-jsdt-pluginMeet the JavaScript Development Toolkithttp://www.ibm.com/developerworks/library/os-eclip原创 2009-05-11 15:14:00 · 833 阅读 · 0 评论 -
Select 操作
1判断select选项中 是否存在Value="paraValue"的Item 2向select选项中 加入一个Item 3从select选项中 删除一个Item 4删除select中选中的项 5修改select选项中 value="paraValue"的text为"paraText" 6设置select中text="paraText"的第一个Item为选中 7设置select中value="pa原创 2009-05-07 09:43:00 · 551 阅读 · 0 评论 -
使用Struts2 AJAX TAG的 formFilter标签
网上找了半天没有找到好的例子,居然在Review Struts2文档的时候找到一个使用formFilter的例子。其实很简单,就是原来不知道怎么写。现在摘录下来。 "text/javascript"> function filter(field) { return field.name == "firstName"; }"userData">原创 2009-05-04 23:23:00 · 998 阅读 · 0 评论 -
在onload上加载执行多个函数
有时候需要用到window.onload函数,但是window.onload函数已经被赋值过了,如果要想加载多个函数,我们要这么写 function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != function) {原创 2009-04-21 08:41:00 · 995 阅读 · 0 评论 -
KeyBoard Key code
TasteKey CodeTasteKey CodeTasteKey Codebackspace8tab9enter13shift16ctrl17alt18pause/break19caps lock20escape27page up3转载 2009-04-10 09:45:00 · 757 阅读 · 0 评论 -
Can not disable IE default shortcut key Action
I tried to capture the key press event action in the web page and it all works very well by this way. if (keyCode == 113) { //alert("F2"); add();But when tried to disable IE de原创 2009-04-10 09:48:00 · 742 阅读 · 0 评论 -
Handle Back Button
Mastering The Back Button With JavascriptFiled: Wed, Feb 28 2007 under Programming|| Tags: ajax history secure sessionsAsk how to control the back button on a forum and youll be quickly lectured转载 2009-04-19 00:04:00 · 1173 阅读 · 0 评论 -
onbeforeunload and onunload event
onbeforeunload与onunload事件Onunload,onbeforeunload都是在刷新或关闭时调用,可以在脚本中通过window.onunload来指定或者在里指定。区别在于onbeforeunload在onunload之前执行,它还可以阻止onunload的执行。 Onbeforeunload也是在页面刷新或关闭时调用,Onbeforeunload是原创 2009-04-18 22:36:00 · 559 阅读 · 0 评论 -
JavaScript
var theTable = document.getElementsByTagName("table")[0];//Here close one tr as templatevar newRowTemplate = theTable.rows[theTable.rows.length-1].cloneNode(true);//Must be tbody, Can not appe原创 2009-04-13 17:22:00 · 450 阅读 · 0 评论 -
用 JavaScript 操作字符串
用 JavaScript 操作字符串 作者: builder 2005-07-08 03:59 PM 虽然 JavaScript 有原创 2006-05-31 08:54:00 · 1142 阅读 · 0 评论 -
Style.display 的用法
使用Style.display 样式时,显示对象用 obj.style.display = "block";隐藏对象用 obj.style.display = "none"附:display 语法 Syntax HTML { display : sDisplay }原创 2006-05-30 18:00:00 · 10507 阅读 · 1 评论 -
javascript中parseInt的问题 - -
在用javascript的 parseInt 函数时,parseInt("08")或者parseInt("09")返回的居然是0,而parseInt("01")...parseInt("07")都是正确的,一开始很难理解,后来发现出现这个问题的原因是当在前面有"0"时,javascript的debugger会认为这是一个八进制数,而"08"和"09"不是一个合法的八进制数,所以导致了那个问题,但是原创 2006-04-17 16:34:00 · 1579 阅读 · 1 评论 -
Mozilla 中取时间的问题
用getFullYear()Mozilla 中var d = Date(2006,5,1); alert(d.getYear()); IE显示为2006 FF显示为106 用getFullYear()可取出正确的时间原创 2006-02-23 16:59:00 · 838 阅读 · 0 评论 -
javascript time format
Date.prototype.format = function(format) //author: meizz{ var o = { "M+" : this.getMonth()+1, //month "d+" : this.getDate(), //day "h+" : this.getHours(), //hour "m+" : this.getMinut原创 2006-01-12 15:18:00 · 1336 阅读 · 0 评论 -
Advanced Event Registration Model
On this page I explain the two advanced event registration models: W3C’s and Microsoft’s. Since neither is cross–browser supported, their use is, for the moment, deprecated.W3C and Microsoft have bo转载 2009-05-13 23:00:00 · 538 阅读 · 0 评论