Mega Code Archive

 
Categories / JavaScript Tutorial / Object Oriented
 

Object unwatch()

Syntax object.unwatch(prop) The unwatch() method removes a watchpoint set on a property with the watch() method. 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>