8e589012

Этот скрипт даст на


<script language="JavaScript1.2">
o = {p:1}
o.watch("p",
   function (id,oldval,newval) {
      document.writeln("o." + id + " changed from "
         + oldval + " to " + newval)
      return newval
   })o.p = 2
o.p = 3
delete o.p
o.p = 4o.unwatch('p')
o.p = 5</script> Этот скрипт даст на выходе:
o.p changed from 1 to 2
o.p changed from 2 to 3
o.p changed from 3 to 4

Содержание    Назад    Вперед