昨天有同学问我问题,他告诉我他的Action中的一个属性明明提供了get/set方法,但是在方法中却获取不到表单中传递过来的值.代码如下(简化后的代码) public class UserAction implements modelDriven<User>(){ private String name; private User model; public void setName(String name){ this.name=name; } public String getName()…
代码如下: function Animal(){} function Dog (age){ this.name = 'fuck you' ; this.age = age } var dog = new Dog(12); console.log(dog); //{name: "fuck you", age: 12} Dog.prototype = Animal; var dog2 = new Dog(12); console.log(dog2);//{age: 12} dog2对象的n…