I'm new in software dev and I'm yet to understand how ids works/are generated from the backend. I'm experimenting with a kanban board app on the front-end in this order:
我是软件开发人员的新手,我还不了解ID是如何从后端生成/生成的。我正按照以下顺序在前端试验看板板应用程序:
List1
-CardA
-TaskB
-CardB
-TaskA
-TaskB
List2
-CardA
-TaskA
-TaskB
-TaskC
-CardB
-TaskA
-TaskB
I'm wondering if it's fine to have the same id for two different entities. I mean, is it Ok for a random Task or Card to have the same id with some other random List or with a Card? Or must all Tasks, Cards or List id be strictly unique no matter what Where they belong to?
我想知道两个不同实体的id是否合适。我的意思是,随机任务或卡与其他随机列表或卡有相同的ID是否可以?或者所有任务,卡片或列表ID必须严格唯一,无论它们属于哪个位置?
1 个解决方案
#1
0
根据HTML 4规范7.5.2:
id = name [CS] This attribute assigns a name to an element. This name must be unique in a document.
id = name [CS]此属性为元素指定名称。该名称在文档中必须是唯一的。
#1
0
根据HTML 4规范7.5.2:
id = name [CS] This attribute assigns a name to an element. This name must be unique in a document.
id = name [CS]此属性为元素指定名称。该名称在文档中必须是唯一的。