See "About This JavaScript Site" in JavaScript Index and Introduction.
Code will be added and removed from time to time; do not assume that anything will remain here. Code here is at best liable to be under-tested and at worst may be totally wrong. Good bits are likely to be put into Date and Time Introduction ff. or JavaScript General or JavaScript Maths or JavaScript Alarm. See notes at JavaScript Date and Time Introduction.
Toggle the second Style Sheet to be :
BETTER : Toggle the second Style Sheet to be :
OR : Second Style Sheet :
Font Size
My Default Font
normal normal medium Times New Roman
Generics
Families
Font
E.G. bold italic small Papyrus ; normal normal medium Helvetica
I now use function Wryt for this, previously it demonstrated function DynWrite from my file include1.js, much as was found in the news:comp.lang.javascript FAQ.
Redirection Test - what should this do?.
Work on-line only :-
I now put almost all code into functions, which are displayed by using the toString() method as illustrated in Index and Introduction.
Code generally used can be seen in Include Functions.
To get more accurate results, copy the code and increase Loops.
Figures approximate, in millions :
XP sp3; 3.0GHz : IE7 0.11, FF2 0.20, Opera 9.27 0.45, Safari 3.1.2 1.22
XP sp3; 1.7GHz : IE7 0.14, FF3 0.28, Opera 9.52 0.45, Safari 3.1.2 1.10, Chrome 0.2 1.35
var buf = [] for (...long loop...) { // ... buf.push("string to append") } ... buf.join("")
Using an object? :-
function SB() { this.buf = [] } SB.prototype.Ap = function Ap(string) { this.buf.push(string) return this } SB.prototype.toString = function toString() { return this.buf.join("") } Str = new SB().Ap("hello ").Ap("world")
For IE4, .push must be added or emulated.
Function enumm is a little like enum in other languages.
Function parseInt, with a single string argument containing a leading zero, may use either octal or decimal.
Oct 2008 : MSIE, Firefox, Safari, Chrome all give 0; Opera gives 9.
The quick brown fox jumps over the lazy dog.
Needs polish.