Object.unwatch() : Object : Object Oriented JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Object Oriented » Object »

 

Object.unwatch()









Syntax








object.unwatch(prop)




  1. The unwatch() method removes a watchpoint set on a property with the watch() method.

  2. This method takes a the property, prop, as a parameter.












<html>
    <body>
    <script language="JavaScript">
    <!--
    function inform(){
         document.write("Tmp variable changed from 1 to 3");
    }
    var tmp = 1;

    watch("tmp",inform);
    tmp=3;
    unwatch("tmp");
    tmp=7;

    -->
    </script>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Object Oriented
» Object