本页是js命名空间首页。与js、ajax等有关的内容放此命名空间下。 **导航** - [[ajax框架列表]] - [[yahoo_ui_library|Yahoo! UI Library]] - [[Spry|Spry framework for Ajax]] - [[dojo]] - [[jquery]] : http://jquery.com/ - [[ext]] http://extjs.com - [[省市关联菜单]] - [[start#js小技巧|js小技巧]] - [[判断activeX是否存在]] - [[实用的JS]] - [[vform|封装好的表单验证js]] - [[网页图片按比例自适应大小的JS]] - [[Xiaonei_js_framework]] - [[http长连接]] - [[CKEditor Config & Plugin]] ====== JS小技巧 ====== - 复制内容到剪切板 function setCopy(_sTxt){try{clipboardData.setData('Text',_sTxt); alert("网址粘贴成功!");}catch(e){}} - 数组定义: var a = [a,b] ; - 加入收藏 添加收藏 - 设为首页 设为首页 ====== JS兼容问题 ====== - 得到某个对象的绝对坐标 function GetPoint(source) { var tmp = source; var pt = new Object(); if(source.getBoundingClientRect) { var rc = source.getBoundingClientRect(); pt.x = rc.left - 2; pt.y = rc.top - 2; } else { pt.x = 0; pt.y = 0; do { pt.x += tmp.offsetLeft; pt.y += tmp.offsetTop; tmp = tmp.offsetParent; } while(tmp != null && tmp.tagName!="BODY"); } return pt; } ====== 资料 ====== - **非常多的js效果,拖拽等** http://www.dhtmlgoodies.com/index.html - 无忧脚本 http://bbs.51js.com/ - flash文字特效:http://www.ajaxbbs.net/test/FlashFont.html - 超酷的ajax留言本 http://bbs.blueidea.com/thread-2712787-1-1.html - blueidea http://bbs.blueidea.com/forum-1-1.html - **lightbox2** http://www.huddletogether.com/projects/lightbox2/ 这个不错,包括图片、组图、div、iframe、ajax几种方式的处理 - **thickbox** http://jquery.com/demo/thickbox/ ThickBox is a webpage UI dialog widget written in JavaScript on top of the jQuery library. Its function is to show a single image, multiple images, inline content, iframed content, or content served through AJAX in a hybrid modal. - 酒店网站 http://www.hotel-oxford.ro/ - 下落的div,震动: http://51windows.net/hw/asp/jsview.asp?id=364