và một sự kiện là một cái gì đó xe thông báo cho bạn và bạn có thể đáp ứng, chẳng hạn như ánh sáng đỏ nhỏ mà đến ngày khi bạn đang gần như ra khỏi khí. Trong ASP NET AJAX., Tài sản đều được thiết lập bằng cách sử dụng ký hiệu dấu chấm hoặc truy cập thông. | 332 CHAPTER 14 JAVASCRIPT PROGRAMMING WITH AJAX car such as its color a method is something that you can perform on the car such as driving it and an event is something the car informs you of and that you can respond to such as the little red light that comes on when you are nearly out of gas. In AJAX properties are either set using dot notation or accessors. The rule of thumb is that you can use dot syntax when the property is a primitive type such as a string as follows Black Accordingly you use the accessor syntax when the property is a complex object. The accessor syntax uses get_ and set_ methods to get and set the value of the property. For example if your color settings are an object then you will use the following ColorObject Methods are functions that you can call on an object and that don t necessarily need a return parameter. For example if you want to start the ignition on your car you would do it using a method like this Events are actions that take place on your object that raise a notification. In JavaScript you specify the handler for the event by appending add to the event specifying the handler name. For example if you want to handle an event for the fuel running low in your car you would write code like this FuelLowHandler And you would then implement the specified function like this Function FuelLowHander sender args . Using Namespaces in JavaScript Namespaces are a methodology that you can use to group similar classes together to make for easier management. For example if you are building a library of classes for common objects such as car boat house person fruit and dog then it is a good idea to group these into different namespaces for manageability and extensibility. For example you could have a Vehicles namespace that car and boat live in. Then if you were to create an airplane class it would live in the same namespace. Also consider the scenario where CHAPTER .