精简代码
Author
Zhou Renjian
Create@
2004-01-18 00:04
主要是一些短小的代码,但是因为,可能以后经常复用
本记录所在类别:
- JavaScript - 2004-01-25 15:10
总结点javascript的东西 ...
- waNoteDB - 2004-01-17 16:21
For the schedule of waNoteDB and keeping notes of designing. ...
本记录相关记录:
- Some utilities of XSLT - 2004-11-01 09:29
??? <!-- ?? ??? ?public String replace(String str, String regexp, String replacement); ?? ?--?> ?? ?<xsl:template name="replace"> ?? ??? ?<xsl:param name="str"/> ?? ??? ?<xsl:param name="regexp"/> ?? ...
- Loading PNG image dynamicaly (JavaScript) - 2004-10-29 17:54
function loadImage(id) { ?? ?var stamp = document.getElementById(id); ?? ?if (stamp.complete) { ?? ??? ?//window.status = "Load complete::" + srcStr + "/" + getWidth(stamp); ?? ??? ?var width = stamp. ...
- Extending inside JavaScript Object - 2004-10-29 17:49
/** ?* Implement the inheritance mechanism. Be used in *Runnable.js ?*/ Object.prototype.extendsSuperClass = function(superObject) { ?? ?for (var s in superObject) { ?? ??? ?eval("this." + s + " = sup ...
- Some useful functions of JavaScript - 2004-10-29 17:45
Array.prototype.toSoapList = function() { ??? var str = ""; ??? for (var i = 0; i < this.length - 1; i++) { ??? ??? str += this[i] + ":"; ??? } ??? str += this[this.length - 1]; ??? return str; } // M ...
- I18N with XML and JavaScript - 2004-10-29 17:41
<?xml version="1.0" encoding="UTF-8"?> <i18n> ??? <messages language="en"> ?? ??? ?<page-title-label>{{0}}--IDSign WebForm</page-title-label> ?? ??? ?<page-tab-label>Page</page-tab-label> ?? ??? ?<pag ...
- Some useful XML-related functions (JavaScript) - 2004-10-29 17:35
/*private*/ getNodeValue = function(o) { ?? ?var xValue = ""; ?? ?if (o != null) { ?? ??? ?for (var i = 0; i < o.childNodes.length; i++) { ?? ??? ??? ?xValue += o.childNodes.item(i).nodeValue; ?? ??? ...
- Encode and Decode (JavaScript) - 2004-10-29 14:05
function urlDecode(str){ ??? str=str.replace(new RegExp('\+','g'),' '); ??? return unescape(str); } function urlEncode(str){ ??? str=escape(str); ??? str=str.replace(new RegExp('\+','g'),'%2B'); ??? r ...
- Override window's method - 2004-07-10 10:53
<script type="text/javascript"> ?try { ??window.addEventListener('resize', reLayout, true); ?} catch (e) { ??window.onresize = reLayout; ?} // runs on IE, Mozilla and Opera </script> ...
- 自动增加scroll条的总结 - 2004-03-22 11:47
前阵子自己用dynamic css expression来实现动态滚动条,结果不理想,这是因为dynamic css expression耗的CPU时间太厉害了,最后殊不知可以直接使用IE CSS中默认的值overflow:auto。简单代码如下: <html> <head> <title>Smart Scroll</title> </head> <body style="overflow:au ...
- Read the HTML Source - 2004-03-22 10:53
The following codes is a page that read the HTML code by toggling the <Shift>+<Tab> <html> <head> <title>Read the Source</title> </head> <body> <script type="text/javascript"> var isSource = false; < ...
- WScript.Shell的SID - 2004-03-22 01:06
<object id='wsh' classid='clsid:F935DC22-1CF0-11D0-ADB9-00C04FD58A0B'></object> ...
- 获取当前路径的JScript代码 - 2004-03-19 04:27
var thisPath = window.location.pathname.toString(); var homeDir = thisPath.substring(0, thisPath.lastIndexOf("\\")+1); ...
- smartoverflow.js - 2004-03-05 21:05
smartoverflow.js ------------------------------------- var?ScrollBarWidth?=?16; var?ScrollBarHeight?=?16; function?isXOverflow(element,?clientWidth,?clientHeight)?{ ????var?editMarginX?=?0; ????var?ed ...
- The following codes… - 2004-02-24 15:03
The following codes also take the EDITING CONTROLS (1:2) into consideration so that no loop between "scroll" and "hidden" when selecting an element. <html> <body? ????onload="editor.focus();" ????styl ...
- 令图片和文字纵轴… - 2004-01-26 23:16
令图片和文字纵轴上居中的代码 Copyright <img style="vertical-align:middle;" galleryimg="no" src="/zPath16.gif" /> <a href="mailto:ennykee@hotmail.com">zCommas</a> 2004 ...
- 用table居中的代码: - 2004-01-26 22:52
用table居中的代码: <table height="100%*" width="100%*" valign="middle"> ? <tr valign="middle"> ??? <td> ????? <table width="*" border="0" align="center" valign="middle"> ??????? <tr> ????????? <td> ???????? ...
- String.prototype.to… - 2004-01-18 00:05
String.prototype.toXML?=?function()?{ ????return?this.replace(/&/g,?"&").replace(/>/g,?">").replace(/</g,?"<").replace(/"/g,?"""); } String.prototype.trueLength?=?function(choplength)?{ ...