logo To Foot
© J R Stockton, ≥ 2009-11-12

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.



Style Sheet Tests

Toggle the second Style Sheet to be :

BETTER : Toggle the second Style Sheet to be :

OR : Second Style Sheet :

Body Font Tests

Font Size
               

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.

Overall?

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

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

Perhaps Very Temporary

Enumerate

Function enumm is a little like enum in other languages.

parseInt

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.

Translate

The quick brown fox jumps over the lazy dog.

Google Translate 1

Do not operate if this is not in English
  →  
Set the box, click the blank
e.g. fr it de nl

Needs polish.

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