Rechner und Zahlengenerator

Betreff = Rechner und Zahlengenerator

Ich benötige zwei Dinge per Javascript:

  1. Ein Textfeld, in dem ich eine Formel eingeben kann
    und welches dann das Ergebnis sofort ausspuckt.
    z.B.
    –> Inhalt des Textfelds (Ergebnis): Inhalt_Form1 * Inhalt_Form / 100

  2. Ein Textfeld, welches sofort als Inhalt eine Zahl liefert,
    welche aus aktuellem Datum und Uhrzeit besteht.
    z.B.
    –> „01012001134910“

Meine Frage: Gibt es sowas? Wie sieht sowas aus?

function calc()
 {
 foo = document.forms[0].elements;
 t0 = new Date();
 foo[0].value = (t0.getYear()\>1900)? t0.getYear():1900+t0.getYear();
 foo[0].value += format00(t0.getMonth()+1);
 foo[0].value += format00(t0.getDate());
 foo[0].value += format00(t0.getHours());
 foo[0].value += format00(t0.getMinutes());
 foo[0].value += format00(t0.getSeconds());

 foo[2].value=eval(foo[1].value)
 }

function format00(arg1)
 {
 return (arg1\<10)? "0"+arg1 : arg1;
 }

yyyymmtthhmmss

formel
ergebnis