I see questions like this one a fair bit: The author has written this code (and is apparently using jQuery):function Obj() {
this.id = 0;
this.name = '';
}
Obj.prototype.setName = function(name) {
this.name = name;
};
function init() {
var object1;
object1 = new Obj();
object1.setName("Chris");
alert(object1.name); // alerts 'Chris'
$.post('my_json_list.php',
↧