logo To Foot
© J R Stockton, ≥ 2008-01-14

JavaScript Tests.

No-Frame * Framed Index * Frame This
Links within this site :-

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.



Body Font Tests

Font Size

* JavaScript here *

               

My Default Font
  normal normal medium Times New Roman

Generics

Families

Font
E.G. bold italic small Papyrus ; normal normal medium Helvetica

Body Style Test

Dynamic Writing Tests

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.

Test Area
Target

Select this pseudo-link repeatedly
? ? ?

This is a link

This is a link


Just innerHTML :-

0 0

De-Framing

  which may not be the best way.

Redirection

Redirection Test - what should this do?.

General Functions

*.js Viewing

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.

Start Script

Scope

Speed

To get more accurate results, copy the code and increase Loops.

Concatenation

Rounding

Big String Speed

Code should give a value for Len as an expression using Row
Rows 1 -       Loops

Times in milliseconds

???

Code derived from LRN :-
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.

Strings

Prototypes

Leading Zero

Now in Output Formatting.

Perhaps Very Temporary

Auto-Slash

Insert slashes as characters are typed, as required for YYYY/MM/DD.

N.B. Incompatible with convenient editing.

Home Page
Mail: no HTML
© Dr J R Stockton, near London, UK.
All Rights Reserved.
These pages are tested mainly with MS IE 6 and W3's Tidy.
This site, http://www.merlyn.demon.co.uk/, is maintained by me.
Head.