JavaScriptが持つ属性Obj.hasOwnProperty(obj.属性)
336 ワード
<script>
function Person(obj){
this.name = obj.name;
this.age = obj.age;
}
var one = new Person({
name : "hello",
age : 22
});
alert("hasOwnProperty: " + one.hasOwnProperty("name"));
</script>