onchange event

Erik Arvidsson erik.arvidsson at gmail.com
Sun Mar 8 13:44:59 PDT 2009


You can use __defineGetter__ and __defineSetter__ on window in current
browsers (excluding IE). In ES3.1 you can use Object.defineProperty
instead.

On Sun, Mar 8, 2009 at 05:39, memolus at googlemail.com
<memolus at googlemail.com> wrote:
> I like to use an onchange event.
>
> Example:
>
> money = 100;
> money.onchange = function() { refreshMoneyDisplay(); if(this <= 0) {
> alert("You do no have money anymore.") } };
> refreshMoneyDisplay = function() {
> document.getElementById("money").value = money; }
> _______________________________________________
> Es-discuss mailing list
> Es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>



-- 
erik


More information about the Es-discuss mailing list