Sahra: Logische Operatoren

Ola hola,

ich habe folgende Abfrage

if((0 == $('checkcount').value) || (0 == $('yescount').value)){
}

Obwohl alert alert($('checkcount').value + "|" + $('yescount').value); schön 1|1 ausgibt möchte die Abfrage das nicht verstehen. || heißt doch oder oder?

Cucu
S

  1. Mahlzeit Sahra,

    Obwohl alert alert($('checkcount').value + "|" + $('yescount').value); schön 1|1 ausgibt möchte die Abfrage das nicht verstehen.

    Definiere "möchte [...] das nicht verstehen" ... was steht in der Fehlerkonsole?

    || heißt doch oder oder?

    Das schon ... aber (0 == '1') ist evtl. fehlerträchtig. Vielleicht solltest Du Dir http://de.selfhtml.org/javascript/objekte/unabhaengig.htm#parse_int@title=parseInt() und/oder http://de.selfhtml.org/javascript/objekte/unabhaengig.htm#string@title=String() genauer anschauen.

    MfG,
    EKKi

    --
    sh:( fo:| ch:? rl:( br:> n4:~ ie:% mo:} va:) de:] zu:) fl:{ ss:) ls:& js:|
    1. ohoh

      ich lande im richtigen fall. montag halt...

      cucu
      s