2011年4月12日
摘要: 来自我的javascript群 方法一var addEvent = (function () { if (document.addEventListener) { return function (el, type, fn) { el.addEventListener(type, fn, false); }; } else { return function (el, type, fn) { el.attachEvent('on' + type, function () { return fn.call(el, window.event); }); } }})();方法二va 阅读全文
posted @ 2011-04-12 21:57 ia00.com 阅读(500) 评论(0) 推荐(0)
摘要: 1、基本思想 假设待排序的记录存放在数组R[1..n]中。初始时,R[1]自成1个有序区,无序区为R[2..n]。从i=2起直至i=n为止,依次将R[i]插入当前的有序区R[1..i-1]中,生成含n个记录的有序区。<!doctype html><html> <head><title>javascript直接插入排序</title> <meta charset = "utf-8" /> </head> <body> <script> var arr = []; for 阅读全文
posted @ 2011-04-12 13:44 ia00.com 阅读(203) 评论(0) 推荐(0)
摘要: <!doctype html><html><head> <title>自动调整大小的textarea </title> <meta charset = "utf-8" /> <style type = "text/css"> .editable{cursor:text; font-size:13px; color:#003366;width:80px;line-height:20px;height:20px;font-family:Arial;cursor:text;*o 阅读全文
posted @ 2011-04-12 13:19 ia00.com 阅读(510) 评论(0) 推荐(0)