JS中attribute和property的区别

  • attribute是HTML标签上的特性,它的值只能够是字符串;html 上id,class
  • property是JavaScript里定义的对象; 如var  obj={x:1,y:2}  ,这里x,y就是属性property
原文地址:https://www.cnblogs.com/liubingyjui/p/10148500.html